chore: cleanup

Signed-off-by: Paul Brousseau <object88@gmail.com>
pull/8785/head
Paul Brousseau 5 years ago
parent bff2215e1b
commit 90bf853a3c

@ -116,7 +116,6 @@ func executeActionCommandStdinC(store *storage.Storage, in *os.File, cmd string)
return fake return fake
}, },
Releases: store, Releases: store,
KubeClient: nil,
Capabilities: chartutil.DefaultCapabilities, Capabilities: chartutil.DefaultCapabilities,
Log: func(format string, v ...interface{}) {}, Log: func(format string, v ...interface{}) {},
} }

@ -424,7 +424,6 @@ func (c *Configuration) Init(getter genericclioptions.RESTClientGetter, namespac
client.Namespace = namespace client.Namespace = namespace
return client return client
} }
c.KubeClient = nil
c.Releases = store c.Releases = store
c.Log = log c.Log = log

@ -299,7 +299,6 @@ func TestInstallRelease_FailedHooks(t *testing.T) {
instAction.ReleaseName = "failed-hooks" instAction.ReleaseName = "failed-hooks"
failer := instAction.cfg.GetKubeClient("").(*kubefake.FailingKubeClient) failer := instAction.cfg.GetKubeClient("").(*kubefake.FailingKubeClient)
failer.WatchUntilReadyError = fmt.Errorf("Failed watch") failer.WatchUntilReadyError = fmt.Errorf("Failed watch")
// instAction.cfg.KubeClient = failer
vals := map[string]interface{}{} vals := map[string]interface{}{}
res, err := instAction.Run(buildChart(), vals) res, err := instAction.Run(buildChart(), vals)
@ -352,7 +351,6 @@ func TestInstallRelease_Wait(t *testing.T) {
instAction.ReleaseName = "come-fail-away" instAction.ReleaseName = "come-fail-away"
failer := instAction.cfg.GetKubeClient("").(*kubefake.FailingKubeClient) failer := instAction.cfg.GetKubeClient("").(*kubefake.FailingKubeClient)
failer.WaitError = fmt.Errorf("I timed out") failer.WaitError = fmt.Errorf("I timed out")
// instAction.cfg.KubeClient = failer
instAction.Wait = true instAction.Wait = true
vals := map[string]interface{}{} vals := map[string]interface{}{}
@ -370,7 +368,6 @@ func TestInstallRelease_Atomic(t *testing.T) {
instAction.ReleaseName = "come-fail-away" instAction.ReleaseName = "come-fail-away"
failer := instAction.cfg.GetKubeClient("").(*kubefake.FailingKubeClient) failer := instAction.cfg.GetKubeClient("").(*kubefake.FailingKubeClient)
failer.WaitError = fmt.Errorf("I timed out") failer.WaitError = fmt.Errorf("I timed out")
// instAction.cfg.KubeClient = failer
instAction.Atomic = true instAction.Atomic = true
vals := map[string]interface{}{} vals := map[string]interface{}{}
@ -391,7 +388,6 @@ func TestInstallRelease_Atomic(t *testing.T) {
failer := instAction.cfg.GetKubeClient("").(*kubefake.FailingKubeClient) failer := instAction.cfg.GetKubeClient("").(*kubefake.FailingKubeClient)
failer.WaitError = fmt.Errorf("I timed out") failer.WaitError = fmt.Errorf("I timed out")
failer.DeleteError = fmt.Errorf("uninstall fail") failer.DeleteError = fmt.Errorf("uninstall fail")
// instAction.cfg.KubeClient = failer
instAction.Atomic = true instAction.Atomic = true
vals := map[string]interface{}{} vals := map[string]interface{}{}

@ -50,7 +50,6 @@ func TestUpgradeRelease_Wait(t *testing.T) {
failer := upAction.cfg.GetKubeClient("").(*kubefake.FailingKubeClient) failer := upAction.cfg.GetKubeClient("").(*kubefake.FailingKubeClient)
failer.WaitError = fmt.Errorf("I timed out") failer.WaitError = fmt.Errorf("I timed out")
// upAction.cfg.KubeClient = failer
upAction.Wait = true upAction.Wait = true
vals := map[string]interface{}{} vals := map[string]interface{}{}
@ -73,7 +72,6 @@ func TestUpgradeRelease_CleanupOnFail(t *testing.T) {
failer := upAction.cfg.GetKubeClient("").(*kubefake.FailingKubeClient) failer := upAction.cfg.GetKubeClient("").(*kubefake.FailingKubeClient)
failer.WaitError = fmt.Errorf("I timed out") failer.WaitError = fmt.Errorf("I timed out")
failer.DeleteError = fmt.Errorf("I tried to delete nil") failer.DeleteError = fmt.Errorf("I tried to delete nil")
// upAction.cfg.KubeClient = failer
upAction.Wait = true upAction.Wait = true
upAction.CleanupOnFail = true upAction.CleanupOnFail = true
vals := map[string]interface{}{} vals := map[string]interface{}{}
@ -100,7 +98,6 @@ func TestUpgradeRelease_Atomic(t *testing.T) {
failer := upAction.cfg.GetKubeClient("").(*kubefake.FailingKubeClient) failer := upAction.cfg.GetKubeClient("").(*kubefake.FailingKubeClient)
// We can't make Update error because then the rollback won't work // We can't make Update error because then the rollback won't work
failer.WatchUntilReadyError = fmt.Errorf("arming key removed") failer.WatchUntilReadyError = fmt.Errorf("arming key removed")
// upAction.cfg.KubeClient = failer
upAction.Atomic = true upAction.Atomic = true
vals := map[string]interface{}{} vals := map[string]interface{}{}
@ -125,7 +122,6 @@ func TestUpgradeRelease_Atomic(t *testing.T) {
failer := upAction.cfg.GetKubeClient("").(*kubefake.FailingKubeClient) failer := upAction.cfg.GetKubeClient("").(*kubefake.FailingKubeClient)
failer.UpdateError = fmt.Errorf("update fail") failer.UpdateError = fmt.Errorf("update fail")
// upAction.cfg.KubeClient = failer
upAction.Atomic = true upAction.Atomic = true
vals := map[string]interface{}{} vals := map[string]interface{}{}

Loading…
Cancel
Save