Merge pull request #83 from Kayuii/master

fix TestHelmInitByAliyunStableRepo
This commit is contained in:
Ivan Pedrazas
2018-12-04 12:07:34 +00:00
committed by GitHub
3 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -159,7 +159,7 @@ func main() {
EnvVar: "PLUGIN_UPDATE_DEPENDENCIES,UPDATE_DEPENDENCIES",
},
cli.StringFlag{
Name: "stable-repo-url",
Name: "stable_repo_url",
Usage: "URL for stable repository (default 'https://kubernetes-charts.storage.googleapis.com')",
EnvVar: "PLUGIN_STABLE_REPO_URL,STABLE_REPO_URL",
},
+1
View File
@@ -399,6 +399,7 @@ func (p *Plugin) debug() {
fmt.Printf("Secrets: %s \n", p.Config.Secrets)
fmt.Printf("Helm Repos: %s \n", p.Config.HelmRepos)
fmt.Printf("ValuesFiles: %s \n", p.Config.ValuesFiles)
fmt.Printf("StableRepoURL: %s \n", p.Config.StableRepoURL)
kubeconfig, err := ioutil.ReadFile(KUBECONFIG)
if err == nil {
fmt.Println(string(kubeconfig))
+1 -5
View File
@@ -573,11 +573,7 @@ func TestHelmInitByAliyunStableRepo(t *testing.T) {
}
init := doHelmInit(plugin)
result := strings.Join(init, " ")
expected := "init "
if plugin.Config.StableRepoURL != "" {
expected = expected + "--stable-repo-url"
}
expected := "init --stable-repo-url " + plugin.Config.StableRepoURL
if expected != result {
t.Error("Helm cannot init for stable repository")
}