Skip to content

Commit

Permalink
ci: Paramterize test-validate-state (#2109)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpayne3506 authored Aug 8, 2023
1 parent de87423 commit 14b916b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
parameters:
clusterName: ""
os: "linux"
restartCase: "false"
restartCase: "false"
cni: "cilium"

steps:
- task: AzureCLI@1
Expand All @@ -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
2 changes: 1 addition & 1 deletion .pipelines/singletenancy/aks/e2e-step-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit 14b916b

Please sign in to comment.