Ensure local compose E2E are run in CI.

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
Guillaume Tardif 2020-12-15 12:42:17 +01:00
parent 10a19b1159
commit 6d34f28beb
3 changed files with 5 additions and 6 deletions

View File

@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
export DOCKER_BUILDKIT=1 export DOCKER_BUILDKIT=1
export BUILDX_NO_DEFAULT_LOAD=1
UNAME_S := $(shell uname -s) UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux) ifeq ($(UNAME_S),Linux)
@ -45,10 +44,10 @@ cli: ## Compile the cli
--output ./bin --output ./bin
e2e-local: ## Run End to end local tests. Set E2E_TEST=TestName to run a single test e2e-local: ## Run End to end local tests. Set E2E_TEST=TestName to run a single test
go test -count=1 -v $(TEST_FLAGS) ./tests/e2e ./tests/skip-win-ci-e2e ./local/e2e go test -count=1 -v $(TEST_FLAGS) ./tests/e2e ./tests/compose-e2e ./tests/skip-win-ci-e2e ./local/e2e
e2e-win-ci: ## Run end to end local tests on Windows CI, no Docker for Linux containers available ATM. Set E2E_TEST=TestName to run a single test e2e-win-ci: ## Run end to end local tests on Windows CI, no Docker for Linux containers available ATM. Set E2E_TEST=TestName to run a single test
go test -count=1 -v $(TEST_FLAGS) ./tests/e2e go test -count=1 -v $(TEST_FLAGS) ./tests/e2e ./tests/compose-e2e
e2e-aci: ## Run End to end ACI tests. Set E2E_TEST=TestName to run a single test e2e-aci: ## Run End to end ACI tests. Set E2E_TEST=TestName to run a single test
go test -count=1 -v $(TEST_FLAGS) ./tests/aci-e2e go test -count=1 -v $(TEST_FLAGS) ./tests/aci-e2e

View File

@ -57,7 +57,7 @@ func TestLocalComposeUp(t *testing.T) {
res := c.RunDockerCmd("compose", "ps", "-p", projectName) res := c.RunDockerCmd("compose", "ps", "-p", projectName)
res.Assert(t, icmd.Expected{Out: `web`}) res.Assert(t, icmd.Expected{Out: `web`})
endpoint := "http://localhost:80" endpoint := "http://localhost:90"
output := HTTPGetWithRetry(t, endpoint+"/words/noun", http.StatusOK, 2*time.Second, 20*time.Second) output := HTTPGetWithRetry(t, endpoint+"/words/noun", http.StatusOK, 2*time.Second, 20*time.Second)
assert.Assert(t, strings.Contains(output, `"word":`)) assert.Assert(t, strings.Contains(output, `"word":`))

View File

@ -4,10 +4,10 @@ services:
words: words:
image: gtardif/sentences-api image: gtardif/sentences-api
ports: ports:
- "8080:8080" - "95:8080"
web: web:
image: gtardif/sentences-web image: gtardif/sentences-web
ports: ports:
- "80:80" - "90:80"
labels: labels:
- "my-label=test" - "my-label=test"