From 9ebb4026602facc21b5c92f088b96e494b7a3358 Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Fri, 3 Nov 2023 08:33:53 -0600 Subject: [PATCH] Change the filepaths based on GOOS --- src/test/e2e/09_component_compose_test.go | 28 ++++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/test/e2e/09_component_compose_test.go b/src/test/e2e/09_component_compose_test.go index 302ce3acb8..3a9270537e 100644 --- a/src/test/e2e/09_component_compose_test.go +++ b/src/test/e2e/09_component_compose_test.go @@ -8,6 +8,7 @@ import ( "fmt" "os" "path/filepath" + "runtime" "testing" "github.com/stretchr/testify/require" @@ -55,14 +56,25 @@ func (suite *CompositionSuite) Test_0_ComposabilityExample() { suite.NoError(err) // Ensure that common names merge - suite.Contains(stdErr, ` - manifests: - - name: multi-games - namespace: dos-games - files: - - ../dos-games/manifests/deployment.yaml - - ../dos-games/manifests/service.yaml - - quake-service.yaml`) + if runtime.GOOS == "windows" { + suite.Contains(stdErr, ` + manifests: + - name: multi-games + namespace: dos-games + files: + - "..\\dos-games\\manifests\\deployment.yaml" + - "..\\dos-games\\manifests\\service.yaml" + - quake-service.yaml`) + } else { + suite.Contains(stdErr, ` + manifests: + - name: multi-games + namespace: dos-games + files: + - ../dos-games/manifests/deployment.yaml + - ../dos-games/manifests/service.yaml + - quake-service.yaml`) + } // Ensure that the action was appended suite.Contains(stdErr, `