From 385fcae1ba0c8450bd89795cade5fafa99f4d771 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Mon, 28 Jun 2021 11:36:37 -0400 Subject: [PATCH] Adding test for user/pass without repo on Helm install Signed-off-by: Matt Farina --- cmd/helm/install_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/helm/install_test.go b/cmd/helm/install_test.go index 13c994b92..b7349e3d5 100644 --- a/cmd/helm/install_test.go +++ b/cmd/helm/install_test.go @@ -20,6 +20,7 @@ import ( "fmt" "net/http" "net/http/httptest" + "path/filepath" "testing" "helm.sh/helm/v3/pkg/repo/repotest" @@ -48,6 +49,8 @@ func TestInstall(t *testing.T) { t.Fatal(err) } + repoFile := filepath.Join(srv.Root(), "repositories.yaml") + tests := []cmdTestCase{ // Install, base case { @@ -244,6 +247,11 @@ func TestInstall(t *testing.T) { cmd: "install aeneas reqtest --namespace default --repo " + srv2.URL + " --username username --password password --pass-credentials", golden: "output/install.txt", }, + { + name: "basic install with credentials and no repo", + cmd: fmt.Sprintf("install aeneas test/reqtest --username username --password password --repository-config %s --repository-cache %s", repoFile, srv.Root()), + golden: "output/install.txt", + }, } runTestActionCmd(t, tests)