Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing test by removing location format and adding port not found specific error #77

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/atlantis/manager/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"})

Expand Down
4 changes: 4 additions & 0 deletions src/atlantis/manager/rpc/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down