Skip to content

Commit

Permalink
ci: update windows job template to use 1 node
Browse files Browse the repository at this point in the history
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
  • Loading branch information
aramase committed Mar 24, 2021
1 parent 9807ae9 commit 3c70752
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ KUBECTL := kubectl
ENVSUBST := envsubst

# Test variables
KIND_VERSION ?= 0.8.1
KUBERNETES_VERSION ?= 1.18.2
KIND_VERSION ?= 0.10.0
KUBERNETES_VERSION ?= 1.20.2
BATS_VERSION ?= 1.2.1
TRIVY_VERSION ?= 0.14.0
PROTOC_VERSION ?= 3.15.2
Expand Down
6 changes: 3 additions & 3 deletions test/bats/azure.bats
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ setup() {
result=$(kubectl get secret foosecret -o jsonpath="{.metadata.labels.secrets-store\.csi\.k8s\.io/managed}")
[[ "${result//$'\r'}" == "true" ]]

run wait_for_process $WAIT_TIME $SLEEP_TIME "compare_owner_count foosecret default 4"
run wait_for_process $WAIT_TIME $SLEEP_TIME "compare_owner_count foosecret default 2"
assert_success
}

@test "Sync with K8s secrets - delete deployment, check owner ref updated, check secret deleted" {
run kubectl delete -f $BATS_TESTS_DIR/nginx-deployment-synck8s-azure.yaml
assert_success

run wait_for_process $WAIT_TIME $SLEEP_TIME "compare_owner_count foosecret default 2"
run wait_for_process $WAIT_TIME $SLEEP_TIME "compare_owner_count foosecret default 1"
assert_success

run kubectl delete -f $BATS_TESTS_DIR/nginx-deployment-two-synck8s-azure.yaml
Expand Down Expand Up @@ -197,7 +197,7 @@ setup() {
result=$(kubectl exec -n test-ns $POD -- printenv | grep SECRET_USERNAME) | awk -F"=" '{ print $2}'
[[ "${result//$'\r'}" == "${SECRET_VALUE}" ]]

run wait_for_process $WAIT_TIME $SLEEP_TIME "compare_owner_count foosecret test-ns 2"
run wait_for_process $WAIT_TIME $SLEEP_TIME "compare_owner_count foosecret test-ns 1"
assert_success
}

Expand Down
7 changes: 3 additions & 4 deletions test/bats/tests/azure/job_templates/kubernetes_windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"orchestratorProfile": {
"orchestratorType": "Kubernetes",
"orchestratorRelease": "1.18",
"orchestratorRelease": "1.19",
"kubernetesConfig": {
"addons": [
{
Expand All @@ -24,7 +24,7 @@
"agentPoolProfiles": [
{
"name": "windowspool1",
"count": 2,
"count": 1,
"vmSize": "Standard_D2s_v3",
"osDiskSizeGB": 128,
"availabilityProfile": "AvailabilitySet",
Expand All @@ -51,5 +51,4 @@
"secret": ""
}
}
}

}
6 changes: 3 additions & 3 deletions test/bats/vault.bats
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,15 @@ EOF
result=$(kubectl get secret foosecret -o jsonpath="{.metadata.labels.secrets-store\.csi\.k8s\.io/managed}")
[[ "${result//$'\r'}" == "true" ]]

run wait_for_process $WAIT_TIME $SLEEP_TIME "compare_owner_count foosecret default 4"
run wait_for_process $WAIT_TIME $SLEEP_TIME "compare_owner_count foosecret default 2"
assert_success
}

@test "Sync with K8s secrets - delete deployment, check secret is deleted" {
run kubectl delete -f $BATS_TESTS_DIR/nginx-deployment-synck8s.yaml
assert_success

run wait_for_process $WAIT_TIME $SLEEP_TIME "compare_owner_count foosecret default 2"
run wait_for_process $WAIT_TIME $SLEEP_TIME "compare_owner_count foosecret default 1"
assert_success

run kubectl delete -f $BATS_TESTS_DIR/nginx-deployment-two-synck8s.yaml
Expand Down Expand Up @@ -254,7 +254,7 @@ EOF
result=$(kubectl exec -n test-ns $POD -- printenv | grep SECRET_USERNAME | awk -F"=" '{ print $2 }' | tr -d '\r\n')
[[ "$result" == "hello1" ]]

run wait_for_process $WAIT_TIME $SLEEP_TIME "compare_owner_count foosecret test-ns 2"
run wait_for_process $WAIT_TIME $SLEEP_TIME "compare_owner_count foosecret test-ns 1"
assert_success
}

Expand Down

0 comments on commit 3c70752

Please sign in to comment.