From a82c19b91ac399ba824e2f386c73d8773396243f Mon Sep 17 00:00:00 2001 From: Anton Galitsyn Date: Wed, 28 Dec 2016 23:20:20 +0700 Subject: [PATCH] fix rebase problems --- cmd/helm/init_test.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/cmd/helm/init_test.go b/cmd/helm/init_test.go index d30b985aa..d03e1b93f 100644 --- a/cmd/helm/init_test.go +++ b/cmd/helm/init_test.go @@ -43,22 +43,20 @@ func TestInitCmd(t *testing.T) { defer os.Remove(home) var buf bytes.Buffer - - fake := testclient.Fake{} + fc := fake.NewSimpleClientset() cmd := &initCmd{ out: &buf, home: helmpath.Home(home), - kubeClient: fake.Extensions(), + kubeClient: fc.Extensions(), + namespace: api.NamespaceDefault, } if err := cmd.run(); err != nil { t.Errorf("expected error: %v", err) } - - actions := fake.Actions() - if action, ok := actions[0].(testclient.CreateAction); !ok || action.GetResource() != "deployments" { - t.Errorf("unexpected action: %v, expected create deployment", actions[0]) + action := fc.Actions()[0] + if !action.Matches("create", "deployments") { + t.Errorf("unexpected action: %v, expected create deployment", action) } - expected := "Tiller (the helm server side component) has been installed into your Kubernetes Cluster." if !strings.Contains(buf.String(), expected) { t.Errorf("expected %q, got %q", expected, buf.String())