Skip to content

Commit

Permalink
tests: implement NetNSDetached method
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Jan 20, 2024
1 parent a323db2 commit 8de3883
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/workers/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ func (s *backend) Rootless() bool {
return false
}

func (s *backend) NetNSDetached() bool {
return false
}

func (s backend) Supports(feature string) bool {
if enabledFeatures := os.Getenv("BUILDKIT_TEST_ENABLE_FEATURES"); enabledFeatures != "" {
for _, enabledFeature := range strings.Split(enabledFeatures, ",") {
Expand Down
4 changes: 4 additions & 0 deletions tests/workers/docker-container.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ func (w *containerWorker) Rootless() bool {
return false
}

func (w *containerWorker) NetNSDetached() bool {
return false
}

func (w *containerWorker) New(ctx context.Context, cfg *integration.BackendConfig) (integration.Backend, func() error, error) {
w.dockerOnce.Do(func() {
w.docker, w.dockerClose, w.dockerErr = dockerWorker{id: w.id}.New(ctx, cfg)
Expand Down
4 changes: 4 additions & 0 deletions tests/workers/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ func (c dockerWorker) Rootless() bool {
return false
}

func (c *dockerWorker) NetNSDetached() bool {
return false
}

func (c dockerWorker) New(ctx context.Context, cfg *integration.BackendConfig) (b integration.Backend, cl func() error, err error) {
moby := bkworkers.Moby{
ID: c.id,
Expand Down
4 changes: 4 additions & 0 deletions tests/workers/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ func (w remoteWorker) Rootless() bool {
return false
}

func (w remoteWorker) NetNSDetached() bool {
return false
}

func (w remoteWorker) New(ctx context.Context, cfg *integration.BackendConfig) (b integration.Backend, cl func() error, err error) {
oci := bkworkers.OCI{ID: w.id}
bk, bkclose, err := oci.New(ctx, cfg)
Expand Down

0 comments on commit 8de3883

Please sign in to comment.