Skip to content

Commit

Permalink
fix: manifest generation integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
MarlonGamez committed Jan 20, 2022
1 parent 7992176 commit da69f7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions integration/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"os"
"os/exec"
"path/filepath"
"strings"
"testing"

"github.com/GoogleContainerTools/skaffold/integration/skaffold"
Expand Down Expand Up @@ -149,7 +150,7 @@ func TestInitWithCLIArtifactAndManifestGeneration(t *testing.T) {
`--artifact={"builder":"Docker","payload":{"path":"./Dockerfile"},"image":"dockerfile-image","manifest":{"generate":true,"port":8080}}`)
skaffold.Init(initArgs...).InDir(dir).WithConfig("skaffold.yaml.out").RunOrFail(t.T)

checkGeneratedManifests(t, dir, []string{"./deployment.yaml"})
checkGeneratedManifests(t, dir, []string{"deployment.yaml"})

skaffold.Run().InDir(dir).WithConfig("skaffold.yaml.out").InNs(ns.Name).RunOrFail(t.T)
})
Expand All @@ -166,7 +167,7 @@ func checkGeneratedConfig(t *testutil.T, dir string) {

func checkGeneratedManifests(t *testutil.T, dir string, manifestPaths []string) {
for _, path := range manifestPaths {
expectedOutput, err := ioutil.ReadFile(filepath.Join(dir, path+".expected"))
expectedOutput, err := ioutil.ReadFile(filepath.Join(dir, strings.Join([]string{".", path, ".expected"}, "")))
t.CheckNoError(err)

output, err := ioutil.ReadFile(filepath.Join(dir, path))
Expand Down

0 comments on commit da69f7f

Please sign in to comment.