From 7494248b4a1d40cf303555efdb11d14dcc476771 Mon Sep 17 00:00:00 2001 From: balopat Date: Mon, 10 Jun 2019 23:33:17 -0400 Subject: [PATCH 1/4] ability to make run a chosen set of integration tests --- DEVELOPMENT.md | 8 ++++++++ Makefile | 4 +++- integration/build_test.go | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index aeea014d715..1abe8726c38 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -170,6 +170,14 @@ _These tests require push access to a project in GCP, and so can only be run by maintainers who have access. These tests will be kicked off by [reviewers](#reviews) for submitted PRs._ +### Running a chosen integration tests + +You can select a chosen integration tests via the `INTEGRATION_TEST_ARGS` env var: + +```shell +INTEGRATION_TEST_ARGS="-run=TestDev/" make integration-test +``` + ## Building skaffold docs The latest version of the skaffold site is based on the Hugo theme of the github.com/google/docsy template. diff --git a/Makefile b/Makefile index 84b93282e1c..3a66f0bd6b5 100644 --- a/Makefile +++ b/Makefile @@ -96,7 +96,7 @@ ifeq ($(GCP_ONLY),true) --zone $(GKE_ZONE) \ --project $(GCP_PROJECT) endif - GCP_ONLY=$(GCP_ONLY) go test -v $(REPOPATH)/integration -timeout 15m + GCP_ONLY=$(GCP_ONLY) go test -v $(REPOPATH)/integration -timeout 15m $(INTEGRATION_TEST_ARGS) .PHONY: release release: cross $(BUILD_DIR)/VERSION @@ -176,6 +176,7 @@ integration-in-kind: kind-cluster skaffold-builder integration-in-docker: skaffold-builder docker run --rm \ -v /var/run/docker.sock:/var/run/docker.sock \ + -v $(HOME)/.kube/config:/root/.kube/config \ -v $(HOME)/.config/gcloud:/root/.config/gcloud \ -v $(GOOGLE_APPLICATION_CREDENTIALS):$(GOOGLE_APPLICATION_CREDENTIALS) \ -e GCP_ONLY=$(GCP_ONLY) \ @@ -184,6 +185,7 @@ integration-in-docker: skaffold-builder -e GKE_ZONE=$(GKE_ZONE) \ -e DOCKER_CONFIG=/root/.docker \ -e GOOGLE_APPLICATION_CREDENTIALS=$(GOOGLE_APPLICATION_CREDENTIALS) \ + -e INTEGRATION_TEST_ARGS=$(INTEGRATION_TEST_ARGS) \ gcr.io/$(GCP_PROJECT)/skaffold-integration .PHONY: submit-build-trigger diff --git a/integration/build_test.go b/integration/build_test.go index b0ef67ee243..f8874be1f7f 100644 --- a/integration/build_test.go +++ b/integration/build_test.go @@ -51,6 +51,10 @@ func TestBuild(t *testing.T) { description: "docker build", dir: "testdata/build", }, + { + description: "testing skaffold itself in alpine", + dir: "testdata/alpine", + }, { description: "git tagger", dir: "testdata/tagPolicy", From 087904229cb3ad1e21bbb947b830d915d4c33c31 Mon Sep 17 00:00:00 2001 From: balopat Date: Mon, 10 Jun 2019 23:34:52 -0400 Subject: [PATCH 2/4] revert accidental experiment --- integration/build_test.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/integration/build_test.go b/integration/build_test.go index f8874be1f7f..b0ef67ee243 100644 --- a/integration/build_test.go +++ b/integration/build_test.go @@ -51,10 +51,6 @@ func TestBuild(t *testing.T) { description: "docker build", dir: "testdata/build", }, - { - description: "testing skaffold itself in alpine", - dir: "testdata/alpine", - }, { description: "git tagger", dir: "testdata/tagPolicy", From 15682540afc80578e14fc2890e7c7a705d61f92c Mon Sep 17 00:00:00 2001 From: Balint Pato Date: Tue, 11 Jun 2019 00:12:01 -0400 Subject: [PATCH 3/4] another revert.. --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 3a66f0bd6b5..8fa0fcbf4a7 100644 --- a/Makefile +++ b/Makefile @@ -176,7 +176,6 @@ integration-in-kind: kind-cluster skaffold-builder integration-in-docker: skaffold-builder docker run --rm \ -v /var/run/docker.sock:/var/run/docker.sock \ - -v $(HOME)/.kube/config:/root/.kube/config \ -v $(HOME)/.config/gcloud:/root/.config/gcloud \ -v $(GOOGLE_APPLICATION_CREDENTIALS):$(GOOGLE_APPLICATION_CREDENTIALS) \ -e GCP_ONLY=$(GCP_ONLY) \ From da2451d91f685e1a3ebafb1205c9249338f21d1a Mon Sep 17 00:00:00 2001 From: Balint Pato Date: Wed, 12 Jun 2019 21:04:46 -0400 Subject: [PATCH 4/4] Update DEVELOPMENT.md --- DEVELOPMENT.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 1abe8726c38..ccac1f4f63c 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -170,9 +170,9 @@ _These tests require push access to a project in GCP, and so can only be run by maintainers who have access. These tests will be kicked off by [reviewers](#reviews) for submitted PRs._ -### Running a chosen integration tests +### Running a subset of integration tests -You can select a chosen integration tests via the `INTEGRATION_TEST_ARGS` env var: +You can select specific integration tests to run via the `INTEGRATION_TEST_ARGS` env var: ```shell INTEGRATION_TEST_ARGS="-run=TestDev/" make integration-test