From bea0484b0eededdc9939fc4d8fed659aa93ed034 Mon Sep 17 00:00:00 2001 From: Ivan Pedrazas Date: Sat, 7 Jan 2017 02:04:35 +0000 Subject: [PATCH] test fixed --- plugin_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugin_test.go b/plugin_test.go index 41d13f5..afae42e 100644 --- a/plugin_test.go +++ b/plugin_test.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "io/ioutil" "os" "strings" @@ -41,6 +42,7 @@ func TestInitialiseKubeconfig(t *testing.T) { } func TestGetHelmCommand(t *testing.T) { + os.Setenv("DRONE_BUILD_EVENT", "push") plugin := &Plugin{ Config: Config{ APIServer: "http://myapiserver", @@ -57,8 +59,9 @@ func TestGetHelmCommand(t *testing.T) { } setHelmCommand(plugin) res := strings.Join(plugin.Config.HelmCommand[:], " ") - expected := "" - // expected := "upgrade --install test-release ./chart/test --set image.tag=v.0.1.0,nameOverride=my-over-app --dry-run --debug" + expected := "upgrade --install test-release ./chart/test --set image.tag=v.0.1.0,nameOverride=my-over-app --dry-run --debug" + fmt.Println(res) + fmt.Println(expected) if res != expected { t.Errorf("Result is %s and we expected %s", res, expected) }