Skip to content

Commit 45a852f

Browse files
committed
test: generate valid Compose project names from Cucumber specs
Signed-off-by: Milas Bowman <[email protected]>
1 parent cd17c8a commit 45a852f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

e2e/cucumber_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"strings"
2626
"testing"
2727

28+
"github.com/compose-spec/compose-go/loader"
2829
"github.com/cucumber/godog"
2930
"github.com/cucumber/godog/colors"
3031
"github.com/mattn/go-shellwords"
@@ -58,7 +59,7 @@ func TestCucumber(t *testing.T) {
5859

5960
func setup(s *godog.ScenarioContext) {
6061
t := s.TestingT()
61-
projectName := strings.Split(t.Name(), "/")[1]
62+
projectName := loader.NormalizeProjectName(strings.Split(t.Name(), "/")[1])
6263
cli := e2e.NewCLI(t, e2e.WithEnv(
6364
fmt.Sprintf("COMPOSE_PROJECT_NAME=%s", projectName),
6465
))

0 commit comments

Comments
 (0)