Skip to content

Commit 8cc49e1

Browse files
committed
Fix tsuru env
1 parent 04ae50f commit 8cc49e1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ func init() {
2323

2424
func execute(h snitch.Hook, t snitch.Tsuru, deploy []snitch.Deploy) error {
2525
var err error
26-
if *appNameContains != "" && !strings.Contains(os.Getenv("TSURU_APP_NAME"), *appNameContains) {
27-
return errors.New("Tsuru App Name does not match with " + *appNameContains)
26+
if *appNameContains != "" && !strings.Contains(os.Getenv("TSURU_APPNAME"), *appNameContains) {
27+
return errors.New("Tsuru App Name does not contains " + *appNameContains)
2828
} else {
2929
h.SetWebHookURL(*webHookURL)
3030

main_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func (t TsuruFake) FindLastDeploy(deploy *[]snitch.Deploy) error {
4040
func setUpSuite() {
4141
os.Setenv("TSURU_APP_TOKEN", "abc123")
4242
os.Setenv("TSURU_HOST", "http://0.0.0.0")
43-
os.Setenv("TSURU_APP_NAME", "someapp-name")
43+
os.Setenv("TSURU_APPNAME", "someapp-name")
4444
}
4545

4646
func tearDownSuite() {
@@ -84,7 +84,7 @@ func TestReturnsErrorWhenAppNameDoesNotContainsSomething(t *testing.T) {
8484
deploy []snitch.Deploy
8585
)
8686

87-
wanted := "Tsuru App Name does not match with " + appContains
87+
wanted := "Tsuru App Name does not contains " + appContains
8888
err = execute(h, tsuru, deploy)
8989

9090
if err == nil {

0 commit comments

Comments
 (0)