diff --git a/pkg/compliance/v1_0_0/check_test.go b/pkg/compliance/v1_0_0/check_test.go index d3f034b2..4a0ab592 100644 --- a/pkg/compliance/v1_0_0/check_test.go +++ b/pkg/compliance/v1_0_0/check_test.go @@ -5,6 +5,7 @@ import ( "context" "fmt" "io/ioutil" + "os" "testing" "time" @@ -56,7 +57,6 @@ func startServer() (*api.Controller, string) { panic(err) } - //defer os.RemoveAll(dir) ctrl.Config.Storage.RootDirectory = dir go func() { // this blocks @@ -80,4 +80,5 @@ func startServer() (*api.Controller, string) { func stopServer(ctrl *api.Controller) { ctrl.Server.Shutdown(context.Background()) + os.RemoveAll(ctrl.Config.Storage.RootDirectory) }