mirror of
https://github.com/ipedrazas/drone-helm.git
synced 2026-06-04 18:24:13 +08:00
Merge pull request #83 from Kayuii/master
fix TestHelmInitByAliyunStableRepo
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user