Documentation and tests.

pull/3206/head^2
eyalbe4 8 years ago
parent 3d29942edc
commit 333c821ec2

@ -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 **Note:** A public GCS bucket can be accessed via simple HTTPS at this address
`https://bucket-name.storage.googleapis.com/`. `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 ### Github Pages example
In a similar way you can create charts repository using GitHub Pages. 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: username and password here:
```console ```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 $ helm repo list
fantastic-charts https://username:password@fantastic-charts.storage.googleapis.com fantastic-charts https://username:password@fantastic-charts.storage.googleapis.com
``` ```

@ -115,16 +115,16 @@ func TestDownload(t *testing.T) {
// test with server backed by basic auth // test with server backed by basic auth
basicAuthSrv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { basicAuthSrv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
username, password, ok := r.BasicAuth() 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) 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) fmt.Fprint(w, expect)
})) }))
defer basicAuthSrv.Close() defer basicAuthSrv.Close()
u, _ := url.ParseRequestURI(basicAuthSrv.URL) u, _ := url.ParseRequestURI(basicAuthSrv.URL)
u.User = url.UserPassword("username", "password") got, err = getter.GetWithCredentials(u.String(), "username", "password")
got, err = getter.Get(u.String())
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }

Loading…
Cancel
Save