Skip to content

Commit

Permalink
Make --build-values test stricter
Browse files Browse the repository at this point in the history
Signed-off-by: Soumik Majumder <[email protected]>
  • Loading branch information
100mik committed Aug 23, 2023
1 parent d046d26 commit 4a58d51
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cli/test/e2e/build_values_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ namespace: test

// Verify that validation checks are not performed while running ytt to build packages
kappCtrl.RunWithOpts([]string{"package", "release", "--chdir", workingDir, "--build-values", "build-values.yml"}, RunOpts{NoNamespace: true})

// Ensure that flag does not affect package output
packageFile, err := os.ReadFile(path.Join(workingDir, "carvel-artifacts", "packages", "samplepackage.corp.com", "package.yml"))
if err != nil {
t.Fatal(err)
}
require.NotContains(t, string(packageFile), "valuesFrom")
})
}

Expand Down Expand Up @@ -313,5 +320,12 @@ fooVal: bar
t.Fatal(err)
}
kappCtrl.RunWithOpts([]string{"package", "release", "--chdir", workingDir, "--build-values", "build-values.yml"}, RunOpts{NoNamespace: true})

// Ensure that flag does not affect package output
packageFile, err := os.ReadFile(path.Join(workingDir, "carvel-artifacts", "packages", "samplepackage.corp.com", "package.yml"))
if err != nil {
t.Fatal(err)
}
require.NotContains(t, string(packageFile), "valuesFrom")
})
}

0 comments on commit 4a58d51

Please sign in to comment.