From 333c821ec208c862bbd1d20f6fa59546716d7fa6 Mon Sep 17 00:00:00 2001 From: eyalbe4 Date: Sun, 21 Jan 2018 19:54:09 +0200 Subject: [PATCH] Documentation and tests. --- docs/chart_repository.md | 7 ++++++- pkg/downloader/chart_downloader_test.go | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/chart_repository.md b/docs/chart_repository.md index 1379573fc..21043dd12 100644 --- a/docs/chart_repository.md +++ b/docs/chart_repository.md @@ -148,6 +148,11 @@ Charts repository hosts its charts, so you may want to take a **Note:** A public GCS bucket can be accessed via simple HTTPS at this address `https://bucket-name.storage.googleapis.com/`. +### JFrog Artifactory + +You can also set up chart repositories using JFrog Artifactory. +Read more about chart repositories with JFrog Artifactory [here](https://www.jfrog.com/confluence/display/RTF/Helm+Chart+Repositories) + ### Github Pages example In a similar way you can create charts repository using GitHub Pages. @@ -271,7 +276,7 @@ If the charts are backed by HTTP basic authentication, you can also supply the username and password here: ```console -$ helm repo add fantastic-charts https://username:password@fantastic-charts.storage.googleapis.com +$ helm repo add fantastic-charts https://username:password@fantastic-charts.storage.googleapis.com my-username my-password $ helm repo list fantastic-charts https://username:password@fantastic-charts.storage.googleapis.com ``` diff --git a/pkg/downloader/chart_downloader_test.go b/pkg/downloader/chart_downloader_test.go index 0100772e9..ca691cd66 100644 --- a/pkg/downloader/chart_downloader_test.go +++ b/pkg/downloader/chart_downloader_test.go @@ -115,16 +115,16 @@ func TestDownload(t *testing.T) { // test with server backed by basic auth basicAuthSrv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { username, password, ok := r.BasicAuth() - if !ok || username != "username" && password != "password" { + if !ok || username != "username" || password != "password" { t.Errorf("Expected request to use basic auth and for username == 'username' and password == 'password', got '%v', '%s', '%s'", ok, username, password) } fmt.Fprint(w, expect) })) + defer basicAuthSrv.Close() u, _ := url.ParseRequestURI(basicAuthSrv.URL) - u.User = url.UserPassword("username", "password") - got, err = getter.Get(u.String()) + got, err = getter.GetWithCredentials(u.String(), "username", "password") if err != nil { t.Fatal(err) }