Skip to content

Commit b9bd6e1

Browse files
committed
Add make commands for e2e tests
Signed-off-by: LogicalShark <[email protected]>
1 parent 5a6a22f commit b9bd6e1

6 files changed

Lines changed: 68 additions & 104 deletions

Makefile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,3 +333,35 @@ run-e2e-test: ## Run e2e tests.
333333
.PHONY: verify-up-to-date
334334
verify-up-to-date: ## Verify that the repository is up to date.
335335
./tools/verify-up-to-date.sh
336+
337+
## --------------------------------------
338+
##@ E2E
339+
## --------------------------------------
340+
341+
.PHONY: test-e2e-latest
342+
test-e2e-latest: ## Run the latest periodic E2E tests.
343+
./dev/ci/periodics/ci-cloud-provider-gcp-e2e-latest.sh
344+
345+
.PHONY: test-e2e-latest-with-gcepd
346+
test-e2e-latest-with-gcepd: ## Run the latest periodic E2E tests with GCE PD.
347+
ENABLE_GCEPD=true ./dev/ci/periodics/ci-cloud-provider-gcp-e2e-latest.sh
348+
349+
.PHONY: test-e2e-latest-with-kubernetes-master
350+
test-e2e-latest-with-kubernetes-master: ## Run the latest periodic E2E tests with Kubernetes master.
351+
USE_KUBERNETES_MASTER=true ./dev/ci/periodics/ci-cloud-provider-gcp-e2e-latest.sh
352+
353+
.PHONY: test-conformance-latest
354+
test-conformance-latest: ## Run the latest periodic conformance tests.
355+
./dev/ci/periodics/ci-cloud-provider-gcp-conformance-latest.sh
356+
357+
.PHONY: test-conformance-latest-with-gcepd
358+
test-conformance-latest-with-gcepd: ## Run the latest periodic conformance tests with GCE PD.
359+
ENABLE_GCEPD=true ./dev/ci/periodics/ci-cloud-provider-gcp-conformance-latest.sh
360+
361+
.PHONY: test-e2e-scenario-kops-simple
362+
test-e2e-scenario-kops-simple: ## Run the kops simple E2E periodic test.
363+
./dev/ci/periodics/ci-cloud-provider-gcp-e2e-scenario-kops-simple.sh
364+
365+
.PHONY: test-presubmit
366+
test-presubmit: ## Run the cloud-provider-gcp presubmit tests.
367+
./dev/ci/presubmits/cloud-provider-gcp-tests
Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +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-
if [[ -f "${REPO_ROOT}/.bazelversion" ]]; then
13-
export BAZEL_VERSION=$(cat "${REPO_ROOT}/.bazelversion")
14-
echo "BAZEL_VERSION set to ${BAZEL_VERSION}"
15-
else
16-
export BAZEL_VERSION="5.3.0"
17-
echo "BAZEL_VERSION - Falling back to 5.3.0"
18-
fi
19-
/workspace/test-infra/images/kubekins-e2e/install-bazel.sh
20-
go install sigs.k8s.io/kubetest2@latest
21-
go install sigs.k8s.io/kubetest2/kubetest2-gce@latest
22-
go install sigs.k8s.io/kubetest2/kubetest2-tester-ginkgo@latest
23-
if [[ -f "${REPO_ROOT}/ginko-test-package-version.env" ]]; then
24-
export TEST_PACKAGE_VERSION=$(cat "${REPO_ROOT}/ginko-test-package-version.env")
25-
echo "TEST_PACKAGE_VERSION set to ${TEST_PACKAGE_VERSION}"
26-
else
27-
export TEST_PACKAGE_VERSION="v1.25.0"
28-
echo "TEST_PACKAGE_VERSION - Falling back to v1.25.0"
29-
fi
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=--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: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,9 @@ set -o xtrace
99
REPO_ROOT=$GOPATH/src/k8s.io/cloud-provider-gcp
1010
cd
1111
export GO111MODULE=on
12-
if [[ -f "${REPO_ROOT}/.bazelversion" ]]; then
13-
export BAZEL_VERSION=$(cat "${REPO_ROOT}/.bazelversion")
14-
echo "BAZEL_VERSION set to ${BAZEL_VERSION}"
15-
else
16-
export BAZEL_VERSION="5.3.0"
17-
echo "BAZEL_VERSION - Falling back to 5.3.0"
18-
fi
19-
/workspace/test-infra/images/kubekins-e2e/install-bazel.sh
12+
# Optional Features
13+
ENABLE_GCEPD=${ENABLE_GCEPD:-"false"}
14+
2015
go install sigs.k8s.io/kubetest2@latest
2116
go install sigs.k8s.io/kubetest2/kubetest2-gce@latest
2217
go install sigs.k8s.io/kubetest2/kubetest2-tester-ginkgo@latest
@@ -27,4 +22,9 @@ else
2722
export TEST_PACKAGE_VERSION="v1.25.0"
2823
echo "TEST_PACKAGE_VERSION - Falling back to v1.25.0"
2924
fi
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\]'
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 & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +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-
if [[ -f "${REPO_ROOT}/.bazelversion" ]]; then
13-
export BAZEL_VERSION=$(cat "${REPO_ROOT}/.bazelversion")
14-
echo "BAZEL_VERSION set to ${BAZEL_VERSION}"
15-
else
16-
export BAZEL_VERSION="5.3.0"
17-
echo "BAZEL_VERSION - Falling back to 5.3.0"
18-
fi
19-
/workspace/test-infra/images/kubekins-e2e/install-bazel.sh
20-
go install sigs.k8s.io/kubetest2@latest
21-
go install sigs.k8s.io/kubetest2/kubetest2-gce@latest
22-
go install sigs.k8s.io/kubetest2/kubetest2-tester-ginkgo@latest
23-
if [[ -f "${REPO_ROOT}/ginko-test-package-version.env" ]]; then
24-
export TEST_PACKAGE_VERSION=$(cat "${REPO_ROOT}/ginko-test-package-version.env")
25-
echo "TEST_PACKAGE_VERSION set to ${TEST_PACKAGE_VERSION}"
26-
else
27-
export TEST_PACKAGE_VERSION="v1.25.0"
28-
echo "TEST_PACKAGE_VERSION - Falling back to v1.25.0"
29-
fi
30-
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 & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +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-
if [[ -f "${REPO_ROOT}/.bazelversion" ]]; then
13-
export BAZEL_VERSION=$(cat "${REPO_ROOT}/.bazelversion")
14-
echo "BAZEL_VERSION set to ${BAZEL_VERSION}"
15-
else
16-
export BAZEL_VERSION="5.3.0"
17-
echo "BAZEL_VERSION - Falling back to 5.3.0"
18-
fi
19-
/workspace/test-infra/images/kubekins-e2e/install-bazel.sh
20-
go install sigs.k8s.io/kubetest2@latest
21-
go install sigs.k8s.io/kubetest2/kubetest2-gce@latest
22-
go install sigs.k8s.io/kubetest2/kubetest2-tester-ginkgo@latest
23-
if [[ -f "${REPO_ROOT}/ginko-test-package-version.env" ]]; then
24-
export TEST_PACKAGE_VERSION=$(cat "${REPO_ROOT}/ginko-test-package-version.env")
25-
echo "TEST_PACKAGE_VERSION set to ${TEST_PACKAGE_VERSION}"
26-
else
27-
export TEST_PACKAGE_VERSION="v1.25.0"
28-
echo "TEST_PACKAGE_VERSION - Falling back to v1.25.0"
29-
fi
30-
cd $GOPATH/src/k8s.io/cloud-provider-gcp
31-
e2e/add-kubernetes-to-workspace.sh
32-
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: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,10 @@ set -o xtrace
99
REPO_ROOT=$GOPATH/src/k8s.io/cloud-provider-gcp
1010
cd
1111
export GO111MODULE=on
12-
if [[ -f "${REPO_ROOT}/.bazelversion" ]]; then
13-
export BAZEL_VERSION=$(cat "${REPO_ROOT}/.bazelversion")
14-
echo "BAZEL_VERSION set to ${BAZEL_VERSION}"
15-
else
16-
export BAZEL_VERSION="5.3.0"
17-
echo "BAZEL_VERSION - Falling back to 5.3.0"
18-
fi
19-
/workspace/test-infra/images/kubekins-e2e/install-bazel.sh
12+
# Optional Features
13+
ENABLE_GCEPD=${ENABLE_GCEPD:-"false"}
14+
USE_KUBERNETES_MASTER=${USE_KUBERNETES_MASTER:-"false"}
15+
2016
go install sigs.k8s.io/kubetest2@latest
2117
go install sigs.k8s.io/kubetest2/kubetest2-gce@latest
2218
go install sigs.k8s.io/kubetest2/kubetest2-tester-ginkgo@latest
@@ -27,4 +23,14 @@ else
2723
export TEST_PACKAGE_VERSION="v1.25.0"
2824
echo "TEST_PACKAGE_VERSION - Falling back to v1.25.0"
2925
fi
30-
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)