diff --git a/.pipelines/cni/load-test-templates/validate-state-template.yaml b/.pipelines/cni/load-test-templates/validate-state-template.yaml index 8f0ae209a2..e0a5a9ce0d 100644 --- a/.pipelines/cni/load-test-templates/validate-state-template.yaml +++ b/.pipelines/cni/load-test-templates/validate-state-template.yaml @@ -1,7 +1,8 @@ parameters: clusterName: "" os: "linux" - restartCase: "false" + restartCase: "false" + cni: "cilium" steps: - task: AzureCLI@1 @@ -13,7 +14,7 @@ steps: inlineScript: | make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}-$(make revision) kubectl get pods -A - make test-validate-state OS=${{ parameters.os }} RESTART_CASE=${{ parameters.restartCase }} + make test-validate-state OS=${{ parameters.os }} RESTART_CASE=${{ parameters.restartCase }} CNI_TYPE=${{ parameters.cni }} name: "ValidateState" displayName: "Validate State" retryCountOnTaskFailure: 3 diff --git a/.pipelines/singletenancy/aks/e2e-step-template.yaml b/.pipelines/singletenancy/aks/e2e-step-template.yaml index 3bdab1d0f9..73ae925906 100644 --- a/.pipelines/singletenancy/aks/e2e-step-template.yaml +++ b/.pipelines/singletenancy/aks/e2e-step-template.yaml @@ -78,7 +78,7 @@ steps: # Remove this once we have cniv1 support for validating the test cluster echo "Validate State skipped for linux cniv1 for now" if [ "${{parameters.os}}" == "windows" ]; then - make test-validate-state OS=${{ parameters.os }} + make test-validate-state OS=${{ parameters.os }} CNI_TYPE=cniv1 fi kubectl delete ns load-test displayName: "Validate State" diff --git a/Makefile b/Makefile index 9e9f238ca0..c095a38a6e 100644 --- a/Makefile +++ b/Makefile @@ -711,6 +711,8 @@ workspace: ## Set up the Go workspace. COVER_PKG ?= . #Restart case is used for cni load test pipeline for restarting the nodes cluster. RESTART_CASE ?= false +# CNI type is a key to direct the types of state validation done on a cluster. +CNI_TYPE ?= cilium # COVER_FILTER omits folders with all files tagged with one of 'unit', '!ignore_uncovered', or '!ignore_autogenerated' test-all: ## run all unit tests. @@ -724,7 +726,7 @@ test-integration: ## run all integration tests. go test -mod=readonly -buildvcs=false -timeout 1h -coverpkg=./... -race -covermode atomic -coverprofile=coverage.out -tags=integration ./test/integration... test-validate-state: - cd test/integration/load && go test -mod=readonly -count=1 -timeout 30m -tags load -run ^TestValidateState -tags=load -restart-case=$(RESTART_CASE) -os=$(OS) + 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) cd ../../.. test-cyclonus: ## run the cyclonus test for npm.