Skip to content

Commit 1976dc1

Browse files
committed
Add make commands for e2e tests
Signed-off-by: LogicalShark <maralder@google.com>
1 parent 5d7a72f commit 1976dc1

6 files changed

+66
-67
lines changed

Makefile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,3 +329,35 @@ run-e2e-test: ## Run e2e tests.
329329
.PHONY: verify-up-to-date
330330
verify-up-to-date: ## Verify that the repository is up to date.
331331
./tools/verify-up-to-date.sh
332+
333+
## --------------------------------------
334+
##@ E2E
335+
## --------------------------------------
336+
337+
.PHONY: test-e2e-latest
338+
test-e2e-latest: ## Run the latest periodic E2E tests.
339+
./dev/ci/periodics/ci-cloud-provider-gcp-e2e-latest.sh
340+
341+
.PHONY: test-e2e-latest-with-gcepd
342+
test-e2e-latest-with-gcepd: ## Run the latest periodic E2E tests with GCE PD.
343+
ENABLE_GCEPD=true ./dev/ci/periodics/ci-cloud-provider-gcp-e2e-latest.sh
344+
345+
.PHONY: test-e2e-latest-with-kubernetes-master
346+
test-e2e-latest-with-kubernetes-master: ## Run the latest periodic E2E tests with Kubernetes master.
347+
USE_KUBERNETES_MASTER=true ./dev/ci/periodics/ci-cloud-provider-gcp-e2e-latest.sh
348+
349+
.PHONY: test-conformance-latest
350+
test-conformance-latest: ## Run the latest periodic conformance tests.
351+
./dev/ci/periodics/ci-cloud-provider-gcp-conformance-latest.sh
352+
353+
.PHONY: test-conformance-latest-with-gcepd
354+
test-conformance-latest-with-gcepd: ## Run the latest periodic conformance tests with GCE PD.
355+
ENABLE_GCEPD=true ./dev/ci/periodics/ci-cloud-provider-gcp-conformance-latest.sh
356+
357+
.PHONY: test-e2e-scenario-kops-simple
358+
test-e2e-scenario-kops-simple: ## Run the kops simple E2E periodic test.
359+
./dev/ci/periodics/ci-cloud-provider-gcp-e2e-scenario-kops-simple.sh
360+
361+
.PHONY: test-presubmit
362+
test-presubmit: ## Run the cloud-provider-gcp presubmit tests.
363+
./dev/ci/presubmits/cloud-provider-gcp-tests
Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
11
#!/bin/bash
22

3-
# TODO: Use published release tars for cloud-provider-gcp if/once they exist
4-
set -o errexit
5-
set -o nounset
6-
set -o pipefail
7-
set -o xtrace
8-
9-
REPO_ROOT=$GOPATH/src/k8s.io/cloud-provider-gcp
10-
cd
11-
export GO111MODULE=on
12-
13-
go install sigs.k8s.io/kubetest2@latest
14-
go install sigs.k8s.io/kubetest2/kubetest2-gce@latest
15-
go install sigs.k8s.io/kubetest2/kubetest2-tester-ginkgo@latest
16-
if [[ -f "${REPO_ROOT}/ginko-test-package-version.env" ]]; then
17-
export TEST_PACKAGE_VERSION=$(cat "${REPO_ROOT}/ginko-test-package-version.env")
18-
echo "TEST_PACKAGE_VERSION set to ${TEST_PACKAGE_VERSION}"
19-
else
20-
export TEST_PACKAGE_VERSION="v1.25.0"
21-
echo "TEST_PACKAGE_VERSION - Falling back to v1.25.0"
22-
fi
23-
kubetest2 gce -v 2 --repo-root $REPO_ROOT --build --up --down --test=ginkgo --master-size e2-standard-2 -- --test-package-version="${TEST_PACKAGE_VERSION}" --focus-regex='\[Conformance\]' --test-args=--enabled-volume-drivers=gcepd
3+
# Wrapper script to run conformance tests with GCEPD enabled via Make
4+
REPO_ROOT=$(git rev-parse --show-toplevel)
5+
cd "${REPO_ROOT}"
6+
make test-conformance-latest-with-gcepd

dev/ci/periodics/ci-cloud-provider-gcp-conformance-latest.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ set -o xtrace
99
REPO_ROOT=$GOPATH/src/k8s.io/cloud-provider-gcp
1010
cd
1111
export GO111MODULE=on
12+
# Optional Features
13+
ENABLE_GCEPD=${ENABLE_GCEPD:-"false"}
1214

1315
go install sigs.k8s.io/kubetest2@latest
1416
go install sigs.k8s.io/kubetest2/kubetest2-gce@latest
@@ -20,4 +22,9 @@ else
2022
export TEST_PACKAGE_VERSION="v1.25.0"
2123
echo "TEST_PACKAGE_VERSION - Falling back to v1.25.0"
2224
fi
23-
kubetest2 gce -v 2 --repo-root $REPO_ROOT --build --up --down --test=ginkgo --master-size e2-standard-2 -- --test-package-version="${TEST_PACKAGE_VERSION}" --focus-regex='\[Conformance\]'
25+
TEST_ARGS=""
26+
if [[ "${ENABLE_GCEPD}" == "true" ]]; then
27+
TEST_ARGS="--enabled-volume-drivers=gcepd"
28+
fi
29+
30+
kubetest2 gce -v 2 --repo-root $REPO_ROOT --build --up --down --test=ginkgo --master-size e2-standard-2 -- --test-package-version="${TEST_PACKAGE_VERSION}" --focus-regex='\[Conformance\]' --test-args="${TEST_ARGS}"
Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
11
#!/bin/bash
22

3-
# TODO: Use published release tars for cloud-provider-gcp if/once they exist
4-
set -o errexit
5-
set -o nounset
6-
set -o pipefail
7-
set -o xtrace
8-
9-
REPO_ROOT=$GOPATH/src/k8s.io/cloud-provider-gcp
10-
cd
11-
export GO111MODULE=on
12-
13-
go install sigs.k8s.io/kubetest2@latest
14-
go install sigs.k8s.io/kubetest2/kubetest2-gce@latest
15-
go install sigs.k8s.io/kubetest2/kubetest2-tester-ginkgo@latest
16-
if [[ -f "${REPO_ROOT}/ginko-test-package-version.env" ]]; then
17-
export TEST_PACKAGE_VERSION=$(cat "${REPO_ROOT}/ginko-test-package-version.env")
18-
echo "TEST_PACKAGE_VERSION set to ${TEST_PACKAGE_VERSION}"
19-
else
20-
export TEST_PACKAGE_VERSION="v1.25.0"
21-
echo "TEST_PACKAGE_VERSION - Falling back to v1.25.0"
22-
fi
23-
kubetest2 gce -v 2 --repo-root $REPO_ROOT --build --up --down --test=ginkgo --node-size e2-standard-4 --master-size e2-standard-8 -- --test-package-version="${TEST_PACKAGE_VERSION}" --parallel=30 --test-args='--minStartupPods=8 --enabled-volume-drivers=gcepd' --skip-regex='\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]'
3+
# Wrapper script to run E2E tests with GCEPD enabled via Make
4+
REPO_ROOT=$(git rev-parse --show-toplevel)
5+
cd "${REPO_ROOT}"
6+
make test-e2e-latest-with-gcepd
Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,6 @@
11
#!/bin/bash
22

3-
# TODO: Use published release tars for cloud-provider-gcp if/once they exist
4-
set -o errexit
5-
set -o nounset
6-
set -o pipefail
7-
set -o xtrace
8-
9-
REPO_ROOT=$GOPATH/src/k8s.io/cloud-provider-gcp
10-
cd
11-
export GO111MODULE=on
12-
13-
go install sigs.k8s.io/kubetest2@latest
14-
go install sigs.k8s.io/kubetest2/kubetest2-gce@latest
15-
go install sigs.k8s.io/kubetest2/kubetest2-tester-ginkgo@latest
16-
if [[ -f "${REPO_ROOT}/ginko-test-package-version.env" ]]; then
17-
export TEST_PACKAGE_VERSION=$(cat "${REPO_ROOT}/ginko-test-package-version.env")
18-
echo "TEST_PACKAGE_VERSION set to ${TEST_PACKAGE_VERSION}"
19-
else
20-
export TEST_PACKAGE_VERSION="v1.25.0"
21-
echo "TEST_PACKAGE_VERSION - Falling back to v1.25.0"
22-
fi
23-
cd $GOPATH/src/k8s.io/cloud-provider-gcp
24-
e2e/add-kubernetes-to-workspace.sh
25-
kubetest2 gce -v 2 --repo-root $REPO_ROOT --build --up --down --test=ginkgo --node-size e2-standard-4 --master-size e2-standard-8 -- --test-package-version="${TEST_PACKAGE_VERSION}" --parallel=30 --test-args='--minStartupPods=8' --skip-regex='\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]'
3+
# Wrapper script to run E2E tests using the kubernetes master branch via Make
4+
REPO_ROOT=$(git rev-parse --show-toplevel)
5+
cd "${REPO_ROOT}"
6+
make test-e2e-latest-with-kubernetes-master

dev/ci/periodics/ci-cloud-provider-gcp-e2e-latest.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ set -o xtrace
99
REPO_ROOT=$GOPATH/src/k8s.io/cloud-provider-gcp
1010
cd
1111
export GO111MODULE=on
12+
# Optional Features
13+
ENABLE_GCEPD=${ENABLE_GCEPD:-"false"}
14+
USE_KUBERNETES_MASTER=${USE_KUBERNETES_MASTER:-"false"}
1215

1316
go install sigs.k8s.io/kubetest2@latest
1417
go install sigs.k8s.io/kubetest2/kubetest2-gce@latest
@@ -20,4 +23,14 @@ else
2023
export TEST_PACKAGE_VERSION="v1.25.0"
2124
echo "TEST_PACKAGE_VERSION - Falling back to v1.25.0"
2225
fi
23-
kubetest2 gce -v 2 --repo-root $REPO_ROOT --build --up --down --test=ginkgo --node-size e2-standard-4 --master-size e2-standard-8 -- --test-package-version="${TEST_PACKAGE_VERSION}" --parallel=30 --test-args='--minStartupPods=8' --skip-regex='\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]'
26+
TEST_ARGS="--minStartupPods=8"
27+
if [[ "${ENABLE_GCEPD}" == "true" ]]; then
28+
TEST_ARGS="${TEST_ARGS} --enabled-volume-drivers=gcepd"
29+
fi
30+
31+
if [[ "${USE_KUBERNETES_MASTER}" == "true" ]]; then
32+
cd $GOPATH/src/k8s.io/cloud-provider-gcp
33+
e2e/add-kubernetes-to-workspace.sh
34+
fi
35+
36+
kubetest2 gce -v 2 --repo-root $REPO_ROOT --build --up --down --test=ginkgo --node-size e2-standard-4 --master-size e2-standard-8 -- --test-package-version="${TEST_PACKAGE_VERSION}" --parallel=30 --test-args="${TEST_ARGS}" --skip-regex='\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]'

0 commit comments

Comments
 (0)