diff --git a/src/atlantis/manager/client/client_test.go b/src/atlantis/manager/client/client_test.go index 666b6c6..fc74e6d 100644 --- a/src/atlantis/manager/client/client_test.go +++ b/src/atlantis/manager/client/client_test.go @@ -114,7 +114,7 @@ func checkCommand(t *testing.T, command interface{}, line string, expected inter } func TestRegisterApp(t *testing.T) { - testName := "e2e-test-" + time.Now().Format("2006-01-02T15-04-05-0700") + testName := "e2e-test-" + time.Now().Format("2006-01-02T15-04-05") log.Print("== Registering dummy app ==") registerCommand := &RegisterAppCommand{Name: testName, Repo: "fake-git-repo", Root: "/path/to/app", @@ -163,7 +163,7 @@ func checkUrl(t *testing.T, url, name, expected string) bool { } func TestFullDeploy(t *testing.T) { - testName := "e2e-test-" + time.Now().Format("2006-01-02T15-04-05-0700") + testName := "e2e-test-" + time.Now().Format("2006-01-02T15-04-05") checkCommand(t, &ListAppsCommand{}, "", &ManagerListAppsReply{[]string{"hello-go"}, "OK"}) diff --git a/src/atlantis/manager/rpc/router.go b/src/atlantis/manager/rpc/router.go index f005bfc..5324f46 100644 --- a/src/atlantis/manager/rpc/router.go +++ b/src/atlantis/manager/rpc/router.go @@ -61,6 +61,10 @@ func (e *GetAppEnvPortExecutor) Execute(t *Task) (err error) { zrp := datamodel.GetRouterPorts(zkApp.Internal) fmt.Printf("ROUTER PORTS: %+v\n", zrp) portStr := zrp.AppEnvMap[helper.GetAppEnvTrieName(e.arg.App, e.arg.Env)] + if portStr == "" { + return errors.New("port not found") + } + fmt.Printf("PORT STRING: %+v -> %+v\n", helper.GetAppEnvTrieName(e.arg.App, e.arg.Env), portStr) port, err := strconv.ParseUint(portStr, 10, 16) if err != nil {