Merge pull request #1065 from gtardif/ci-compose-e2e

Ensure local compose E2E are run in CI.
This commit is contained in:
Guillaume Tardif 2020-12-15 15:33:02 +01:00 committed by GitHub
commit 0a0bc53bae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 6 deletions

View File

@ -13,7 +13,6 @@
# limitations under the License.
export DOCKER_BUILDKIT=1
export BUILDX_NO_DEFAULT_LOAD=1
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
@ -45,10 +44,10 @@ cli: ## Compile the cli
--output ./bin
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
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
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.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)
assert.Assert(t, strings.Contains(output, `"word":`))

View File

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