Skip to content

Commit ecfc8ad

Browse files
committed
fix(tests_suite_test.go): go back to DEIS_WORKFLOW_SERVICE_HOST and port
to fit with k8s service env vars. allows tests to run in k8s in the future
1 parent c978027 commit ecfc8ad

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

_tests/tests_suite_test.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ import (
1717
"testing"
1818
)
1919

20+
const (
21+
deisWorkflowServiceHost = "DEIS_WORKFLOW_SERVICE_HOST"
22+
deisWorkflowServicePort = "DEIS_WORKFLOW_SERVICE_PORT"
23+
)
24+
2025
func init() {
2126
rand.Seed(GinkgoConfig.RandomSeed)
2227
}
@@ -131,13 +136,14 @@ func createKey(name string) {
131136
}
132137

133138
func getController() string {
134-
host := os.Getenv("DEIS_HOST")
139+
host := os.Getenv(deisWorkflowServiceHost)
135140
if host == "" {
136-
panic(`Set DEIS_HOST to the workflow controller hostname for tests, such as:
141+
panicStr := fmt.Sprintf(`Set %s to the workflow controller hostname for tests, such as:
137142
138-
$ DEIS_HOST=deis.10.245.1.3.xip.io make test-integration`)
143+
$ %s=deis.10.245.1.3.xip.io make test-integration`, deisWorkflowServiceHost, deisWorkflowServiceHost)
144+
panic(panicStr)
139145
}
140-
port := os.Getenv("DEIS_PORT")
146+
port := os.Getenv(deisWorkflowServicePort)
141147
switch port {
142148
case "443":
143149
return "https://" + host

0 commit comments

Comments
 (0)