mirror of
https://github.com/jenkinsci/kubernetes-operator.git
synced 2026-10-19 17:40:52 +02:00
feat: add matrix tests for bats and replace the old devoptics plugin in tests (#1102)
This commit is contained in:
+15
-17
@@ -68,8 +68,12 @@ diag() {
|
||||
run try "at most 20 times every 10s to get pods named 'jenkins-jenkins' and verify that '.status.containerStatuses[?(@.name==\"jenkins-master\")].ready' is 'true'"
|
||||
assert_success
|
||||
|
||||
run try "at most 20 times every 5s to get pods named 'jenkins-jenkins' and verify that '.status.containerStatuses[?(@.name==\"jenkins-master\")].ready' is 'true'"
|
||||
run try "at most 20 times every 5s to get pods named 'jenkins-jenkins' and verify that '.status.containerStatuses[?(@.name==\"backup\")].ready' is 'true'"
|
||||
assert_success
|
||||
|
||||
run ${KUBECTL} logs -l jenkins-cr=jenkins --tail=-1
|
||||
assert_success
|
||||
assert_output --partial 'Jenkins is fully up and running'
|
||||
}
|
||||
|
||||
#bats test_tags=phase:helm,scenario:vanilla
|
||||
@@ -161,6 +165,9 @@ diag() {
|
||||
chart/jenkins-operator --wait
|
||||
assert_success
|
||||
assert ${HELM} status default
|
||||
|
||||
# Additional sleep to wait for the upgrade to start deploy a new version
|
||||
sleep 15
|
||||
}
|
||||
|
||||
#bats test_tags=phase:helm,scenario:vanilla
|
||||
@@ -177,30 +184,21 @@ diag() {
|
||||
}
|
||||
|
||||
#bats test_tags=phase:helm,scenario:vanilla
|
||||
@test "1.13 Helm: check Jenkins operator pods status" {
|
||||
[[ ! -f "chart/jenkins-operator/deploy.tmp" ]] && skip "Jenkins helm chart have not been deployed correctly"
|
||||
run verify "there is 1 deployment named 'default-jenkins-operator'"
|
||||
assert_success
|
||||
|
||||
run verify "there is 1 pod named 'default-jenkins-operator-'"
|
||||
assert_success
|
||||
|
||||
run try "at most 20 times every 10s to get pods named 'default-jenkins-operator-' and verify that '.status.containerStatuses[?(@.name==\"jenkins-operator\")].ready' is 'true'"
|
||||
assert_success
|
||||
}
|
||||
|
||||
#bats test_tags=phase:helm,scenario:vanilla
|
||||
@test "1.14 Helm: check Jenkins Pod status" {
|
||||
@test "1.13 Helm: check Jenkins Pod status" {
|
||||
[[ ! -f "chart/jenkins-operator/deploy.tmp" ]] && skip "Jenkins helm chart have not been deployed correctly"
|
||||
run try "at most 20 times every 10s to get pods named 'jenkins-jenkins' and verify that '.status.containerStatuses[?(@.name==\"jenkins-master\")].ready' is 'true'"
|
||||
assert_success
|
||||
|
||||
run try "at most 20 times every 5s to get pods named 'jenkins-jenkins' and verify that '.status.containerStatuses[?(@.name==\"jenkins-master\")].ready' is 'true'"
|
||||
run try "at most 20 times every 5s to get pods named 'jenkins-jenkins' and verify that '.status.containerStatuses[?(@.name==\"backup\")].ready' is 'true'"
|
||||
assert_success
|
||||
|
||||
run ${KUBECTL} logs -l jenkins-cr=jenkins --tail=-1
|
||||
assert_success
|
||||
assert_output --partial 'Jenkins is fully up and running'
|
||||
}
|
||||
|
||||
#bats test_tags=phase:helm,scenario:vanilla
|
||||
@test "1.15 Helm: clean" {
|
||||
@test "1.14 Helm: clean" {
|
||||
run ${HELM} uninstall default --wait
|
||||
assert_success
|
||||
# Wait for the complete removal
|
||||
|
||||
Reference in New Issue
Block a user