Adding test for user/pass without repo on Helm install

Signed-off-by: Matt Farina <matt.farina@suse.com>
pull/9871/head
Matt Farina 3 years ago
parent 4e2e4084ed
commit 385fcae1ba
No known key found for this signature in database
GPG Key ID: 92C44A3D421FF7F9

@ -20,6 +20,7 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"net/http/httptest" "net/http/httptest"
"path/filepath"
"testing" "testing"
"helm.sh/helm/v3/pkg/repo/repotest" "helm.sh/helm/v3/pkg/repo/repotest"
@ -48,6 +49,8 @@ func TestInstall(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
repoFile := filepath.Join(srv.Root(), "repositories.yaml")
tests := []cmdTestCase{ tests := []cmdTestCase{
// Install, base case // 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", cmd: "install aeneas reqtest --namespace default --repo " + srv2.URL + " --username username --password password --pass-credentials",
golden: "output/install.txt", 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) runTestActionCmd(t, tests)

Loading…
Cancel
Save