diff --git a/pkg/sanity/tests.go b/pkg/sanity/tests.go index e11f0d76..47763b75 100644 --- a/pkg/sanity/tests.go +++ b/pkg/sanity/tests.go @@ -42,16 +42,15 @@ func DescribeSanity(text string, body func(*SanityContext)) bool { func registerTestsInGinkgo(sc *SanityContext) { for _, test := range tests { Describe(test.text, func() { - BeforeEach(func() { sc.setup() }) + test.body(sc) + AfterEach(func() { sc.teardown() }) - - test.body(sc) }) } }