Skip to content

Commit 0444131

Browse files
committed
New tests.
1 parent 2ea94c1 commit 0444131

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/fish
2+
3+
source helper.fish
4+
5+
set -g TESTNAME test5b
6+
set -g TESTDESC "Pod resilience in active/failover (production)"
7+
set -g YAMLFILE generated/activefailover-community-pro.yaml
8+
set -g DEPLOYMENT acceptance-activefailover
9+
printheader
10+
11+
# Deploy and check
12+
kubectl apply -f $YAMLFILE
13+
and waitForKubectl "get pod" $DEPLOYMENT "1 *Running" 5 120
14+
and waitForKubectl "get pod" "$DEPLOYMENT-sngl.*1/1 *Running" "" 1 120
15+
and waitForKubectl "get pod" "$DEPLOYMENT-sngl.*0/1 *Running" "" 1 120
16+
and waitForKubectl "get service" "$DEPLOYMENT *ClusterIP" 8529 1 120
17+
and waitForKubectl "get service" "$DEPLOYMENT-ea *LoadBalancer" "-v;pending" 1 180
18+
or fail "Deployment did not get ready."
19+
20+
# Automatic check
21+
set ip (getLoadBalancerIP "$DEPLOYMENT-ea")
22+
testArangoDB $ip 120
23+
or fail "ArangoDB was not reachable."
24+
25+
# Manual check
26+
output "Work" "Now please check external access on this URL with your browser:" " https://$ip:8529/" "then type the outcome followed by ENTER." "Furthermore, put some data in." "Then, kill one single server pod after another." "They should come back, service should continue." "All data must still be there."
27+
inputAndLogResult
28+
29+
# Cleanup
30+
kubectl delete -f $YAMLFILE
31+
waitForKubectl "get pod" $DEPLOYMENT "" 0 120
32+
or fail "Could not delete deployment."
33+
34+
output "Ready" ""
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/fish
2+
3+
source helper.fish
4+
5+
set -g TESTNAME test5c
6+
set -g TESTDESC "Pod resilience in mode cluster (production, enterprise)"
7+
set -g YAMLFILE generated/cluster-enterprise-pro.yaml
8+
set -g DEPLOYMENT acceptance-cluster
9+
printheader
10+
11+
# Deploy and check
12+
kubectl apply -f $YAMLFILE
13+
and waitForKubectl "get pod" "$DEPLOYMENT-prmr" "1/1 *Running" 3 120
14+
and waitForKubectl "get pod" "$DEPLOYMENT-agnt" "1/1 *Running" 3 120
15+
and waitForKubectl "get pod" "$DEPLOYMENT-crdn" "1/1 *Running" 3 120
16+
and waitForKubectl "get service" "$DEPLOYMENT *ClusterIP" 8529 1 120
17+
and waitForKubectl "get service" "$DEPLOYMENT-ea *LoadBalancer" "-v;pending" 1 180
18+
or fail "Deployment did not get ready."
19+
20+
# Automatic check
21+
set ip (getLoadBalancerIP "$DEPLOYMENT-ea")
22+
testArangoDB $ip 120
23+
or fail "ArangoDB was not reachable."
24+
25+
# Manual check
26+
output "Work" "Now please check external access on this URL with your browser:" " https://$ip:8529/" "then type the outcome followed by ENTER." "Furthermore, put some data in with replication factor 2." "Then, kill one pod after another with enough time in between." "They should come back, service should continue." "All data must still be there."
27+
inputAndLogResult
28+
29+
# Cleanup
30+
kubectl delete -f $YAMLFILE
31+
waitForKubectl "get pod" $DEPLOYMENT "" 0 120
32+
or fail "Could not delete deployment."
33+
34+
output "Ready" ""

0 commit comments

Comments
 (0)