diff --git a/test/bdd-test/bdd_main_test.go b/test/bdd-test/bdd_main_test.go index 2a2d78b..933da41 100644 --- a/test/bdd-test/bdd_main_test.go +++ b/test/bdd-test/bdd_main_test.go @@ -79,10 +79,11 @@ func TestMain(m *testing.M) { flag.Parse() opt.Format = "pretty" opt.Paths = []string{"features"} - - exitVal := godog.RunWithOptions("godog", func(s *godog.Suite) { - FeatureContext(s) - }, opt) + exitVal := godog.TestSuite{ + Name: "godog", + ScenarioInitializer: FeatureContext, + Options: &opt, + }.Run() if st := m.Run(); st > exitVal { exitVal = st } diff --git a/test/bdd-test/bdd_test.go b/test/bdd-test/bdd_test.go index 9942739..4d79f5f 100644 --- a/test/bdd-test/bdd_test.go +++ b/test/bdd-test/bdd_test.go @@ -1310,7 +1310,7 @@ func (f *feature) whenICallGetCapacity() error { return nil } -func FeatureContext(s *godog.Suite) { +func FeatureContext(s *godog.ScenarioContext) { f := &feature{} s.Step(`^a CSI service$`, f.aCSIService) s.Step(`^a CSI service with node$`, f.aCSIServiceWithNode) diff --git a/test/integration-test/integration_main_test.go b/test/integration-test/integration_main_test.go index 7be33a7..e44c731 100644 --- a/test/integration-test/integration_main_test.go +++ b/test/integration-test/integration_main_test.go @@ -65,13 +65,15 @@ func TestMain(m *testing.M) { grpcClient, stop = startServer(ctx) fmt.Printf("back from startServer") time.Sleep(5 * time.Second) - - exitVal := godog.RunWithOptions("godog", func(s *godog.Suite) { - FeatureContext(s) - }, godog.Options{ + opt := godog.Options{ Format: "pretty", Paths: []string{"features"}, - }) + } + exitVal := godog.TestSuite{ + Name: "godog", + ScenarioInitializer: FeatureContext, + Options: &opt, + }.Run() if st := m.Run(); st > exitVal { exitVal = st } diff --git a/test/integration-test/integration_test.go b/test/integration-test/integration_test.go index 8dcf697..4387621 100644 --- a/test/integration-test/integration_test.go +++ b/test/integration-test/integration_test.go @@ -707,7 +707,7 @@ func (f *feature) whenICallNodeGetCapabilities() error { return nil } -func FeatureContext(s *godog.Suite) { +func FeatureContext(s *godog.ScenarioContext) { f := &feature{} s.Step(`^a CSI service$`, f.aCSIService) s.Step(`^a basic block volume request name "([^"]*)" arrayId "([^"]*)" protocol "([^"]*)" size "(\d+)"$`, f.aBasicBlockVolumeRequest)