diff --git a/playground/components_test.go b/playground/components_test.go index 2e7c2df..62aa7f9 100644 --- a/playground/components_test.go +++ b/playground/components_test.go @@ -186,7 +186,10 @@ func (tt *testFramework) test(s ServiceGen, args []string) *Manifest { dockerRunner, err := NewLocalRunner(cfg) require.NoError(t, err) - dockerRunner.cleanupNetwork = true + t.Cleanup(func() { + require.NoError(t, dockerRunner.Stop(false)) + }) + tt.runner = dockerRunner err = dockerRunner.Run(context.Background()) diff --git a/playground/local_runner.go b/playground/local_runner.go index fd6091e..77ab6d4 100644 --- a/playground/local_runner.go +++ b/playground/local_runner.go @@ -59,9 +59,6 @@ type LocalRunner struct { // tasks tracks the status of each service tasksMtx sync.Mutex tasks map[string]*task - - // whether to remove the network name after execution (used in testing) - cleanupNetwork bool } type task struct {