Fix TestDependencyBuildCmdWithHelmV2Hash test failures

pull/31377/head
itsmemohamednaseem-rgb 1 year ago
parent 4877e2d7e9
commit a187f2355a

@ -151,8 +151,20 @@ func TestDependencyBuildCmd(t *testing.T) {
} }
func TestDependencyBuildCmdWithHelmV2Hash(t *testing.T) { func TestDependencyBuildCmdWithHelmV2Hash(t *testing.T) {
defer resetEnv()()
// Set up test repository
helmHome := "testdata/helmhome/helm"
os.Setenv("HELM_HOME", helmHome)
chartName := "testdata/testcharts/issue-7233" chartName := "testdata/testcharts/issue-7233"
// Create test environment
repoFile := filepath.Join(helmHome, "repository/repositories.yaml")
if err := os.MkdirAll(filepath.Dir(repoFile), 0755); err != nil {
t.Fatal(err)
}
cmd := fmt.Sprintf("dependency build '%s'", chartName) cmd := fmt.Sprintf("dependency build '%s'", chartName)
_, out, err := executeActionCommand(cmd) _, out, err := executeActionCommand(cmd)

@ -0,0 +1,4 @@
apiVersion: v1
repositories:
- name: test
url: https://example.com/charts
Loading…
Cancel
Save