mirror of
https://github.com/docker/compose.git
synced 2026-10-12 02:13:08 +00:00
test: generate valid Compose project names from Cucumber specs
Signed-off-by: Milas Bowman <[email protected]>
This commit is contained in:
@@ -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),
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user