diff --git a/tests/integration/main_test.go b/tests/integration/main_test.go index 84643fff4..e5755b534 100644 --- a/tests/integration/main_test.go +++ b/tests/integration/main_test.go @@ -99,9 +99,18 @@ func TestV2alpha1(t *testing.T) { func runTestsuite(t *testing.T, testsuite testcontext.Testsuite) { opts := createGoDogOpts(t, testsuite.FeaturePath(), testsuite.TestConcurrency()) suite := godog.TestSuite{ - Name: testsuite.Name(), - ScenarioInitializer: testsuite.InitScenarios, + Name: testsuite.Name(), + ScenarioInitializer: func() func(*godog.ScenarioContext) { + if testsuite.Name() == "v2alpha1" { + return testsuite.InitScenarios + } + return nil + }(), TestSuiteInitializer: func(ctx *godog.TestSuiteContext) { + if testsuite.Name() != "v2alpha1" { + testsuite.InitScenarios(ctx.ScenarioContext()) + } + ctx.BeforeSuite(func() { log.Printf("Executing before suite hooks") for _, hook := range testsuite.BeforeSuiteHooks() {