Skip to content

Commit

Permalink
fix rebase problems
Browse files Browse the repository at this point in the history
  • Loading branch information
agalitsyn committed Dec 28, 2016
1 parent 89ab755 commit a82c19b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions cmd/helm/init_test.go
Expand Up @@ -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())
Expand Down

0 comments on commit a82c19b

Please sign in to comment.