From 45a852f438daba67a1d5a86bbcb37ec62126fbce Mon Sep 17 00:00:00 2001 From: Milas Bowman Date: Fri, 24 Mar 2023 10:54:33 -0400 Subject: [PATCH] test: generate valid Compose project names from Cucumber specs Signed-off-by: Milas Bowman --- e2e/cucumber_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e/cucumber_test.go b/e2e/cucumber_test.go index d9d2128a7..151fba923 100644 --- a/e2e/cucumber_test.go +++ b/e2e/cucumber_test.go @@ -25,6 +25,7 @@ import ( "strings" "testing" + "github.com/compose-spec/compose-go/loader" "github.com/cucumber/godog" "github.com/cucumber/godog/colors" "github.com/mattn/go-shellwords" @@ -58,7 +59,7 @@ func TestCucumber(t *testing.T) { func setup(s *godog.ScenarioContext) { t := s.TestingT() - projectName := strings.Split(t.Name(), "/")[1] + projectName := loader.NormalizeProjectName(strings.Split(t.Name(), "/")[1]) cli := e2e.NewCLI(t, e2e.WithEnv( fmt.Sprintf("COMPOSE_PROJECT_NAME=%s", projectName), ))