tests: add unsupported features detection skeleton

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2023-08-04 11:25:57 +01:00
parent 4e7709e54c
commit 5e46d8057d
5 changed files with 32 additions and 10 deletions

View File

@ -7,6 +7,7 @@ import (
"github.com/moby/buildkit/identity"
"github.com/moby/buildkit/util/testutil/integration"
bkworkers "github.com/moby/buildkit/util/testutil/workers"
"github.com/pkg/errors"
)
@ -17,7 +18,8 @@ func InitRemoteWorker() {
}
type remoteWorker struct {
id string
id string
unsupported []string
}
func (w remoteWorker) Name() string {
@ -29,7 +31,7 @@ func (w remoteWorker) Rootless() bool {
}
func (w remoteWorker) New(ctx context.Context, cfg *integration.BackendConfig) (b integration.Backend, cl func() error, err error) {
oci := integration.OCI{ID: w.id}
oci := bkworkers.OCI{ID: w.id}
bk, bkclose, err := oci.New(ctx, cfg)
if err != nil {
return bk, cl, err
@ -60,7 +62,8 @@ func (w remoteWorker) New(ctx context.Context, cfg *integration.BackendConfig) (
}
return &backend{
builder: name,
builder: name,
unsupportedFeatures: w.unsupported,
}, cl, nil
}