Bläddra i källkod

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

Ensure local compose E2E are run in CI.
Guillaume Tardif 5 år sedan
förälder
incheckning
0a0bc53bae

+ 2 - 3
Makefile

@@ -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

+ 1 - 1
tests/compose-e2e/compose_test.go

@@ -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":`))
 

+ 2 - 2
tests/compose-e2e/fixtures/sentences/docker-compose.yaml

@@ -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"