Skip to content

Commit 14b916b

Browse files
authored
ci: Paramterize test-validate-state (#2109)
1 parent de87423 commit 14b916b

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.pipelines/cni/load-test-templates/validate-state-template.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
parameters:
22
clusterName: ""
33
os: "linux"
4-
restartCase: "false"
4+
restartCase: "false"
5+
cni: "cilium"
56

67
steps:
78
- task: AzureCLI@1
@@ -13,7 +14,7 @@ steps:
1314
inlineScript: |
1415
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}-$(make revision)
1516
kubectl get pods -A
16-
make test-validate-state OS=${{ parameters.os }} RESTART_CASE=${{ parameters.restartCase }}
17+
make test-validate-state OS=${{ parameters.os }} RESTART_CASE=${{ parameters.restartCase }} CNI_TYPE=${{ parameters.cni }}
1718
name: "ValidateState"
1819
displayName: "Validate State"
1920
retryCountOnTaskFailure: 3

.pipelines/singletenancy/aks/e2e-step-template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ steps:
7878
# Remove this once we have cniv1 support for validating the test cluster
7979
echo "Validate State skipped for linux cniv1 for now"
8080
if [ "${{parameters.os}}" == "windows" ]; then
81-
make test-validate-state OS=${{ parameters.os }}
81+
make test-validate-state OS=${{ parameters.os }} CNI_TYPE=cniv1
8282
fi
8383
kubectl delete ns load-test
8484
displayName: "Validate State"

Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,8 @@ workspace: ## Set up the Go workspace.
711711
COVER_PKG ?= .
712712
#Restart case is used for cni load test pipeline for restarting the nodes cluster.
713713
RESTART_CASE ?= false
714+
# CNI type is a key to direct the types of state validation done on a cluster.
715+
CNI_TYPE ?= cilium
714716

715717
# COVER_FILTER omits folders with all files tagged with one of 'unit', '!ignore_uncovered', or '!ignore_autogenerated'
716718
test-all: ## run all unit tests.
@@ -724,7 +726,7 @@ test-integration: ## run all integration tests.
724726
go test -mod=readonly -buildvcs=false -timeout 1h -coverpkg=./... -race -covermode atomic -coverprofile=coverage.out -tags=integration ./test/integration...
725727

726728
test-validate-state:
727-
cd test/integration/load && go test -mod=readonly -count=1 -timeout 30m -tags load -run ^TestValidateState -tags=load -restart-case=$(RESTART_CASE) -os=$(OS)
729+
cd test/integration/load && go test -mod=readonly -count=1 -timeout 30m -tags load -run ^TestValidateState -tags=load -restart-case=$(RESTART_CASE) -os=$(OS) -cni=$(CNI_TYPE)
728730
cd ../../..
729731

730732
test-cyclonus: ## run the cyclonus test for npm.

0 commit comments

Comments
 (0)