Skip to content

Commit 1f99e46

Browse files
committed
New tests.
1 parent 0444131 commit 1f99e46

File tree

3 files changed

+100
-0
lines changed

3 files changed

+100
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/fish
2+
3+
source helper.fish
4+
5+
set -g TESTNAME test6a
6+
set -g TESTDESC "Node resilience in mode single (production)"
7+
set -g YAMLFILE generated/single-community-pro.yaml
8+
set -g DEPLOYMENT acceptance-single
9+
printheader
10+
11+
# Deploy and check
12+
kubectl apply -f $YAMLFILE
13+
and waitForKubectl "get pod" "$DEPLOYMENT-sngl" "1/1 *Running" 1 120
14+
and waitForKubectl "get service" "$DEPLOYMENT *ClusterIP" 8529 1 120
15+
and waitForKubectl "get service" "$DEPLOYMENT-ea *LoadBalancer" "-v;pending" 1 180
16+
or fail "Deployment did not get ready."
17+
18+
# Automatic check
19+
set ip (getLoadBalancerIP "$DEPLOYMENT-ea")
20+
testArangoDB $ip 120
21+
or fail "ArangoDB was not reachable."
22+
23+
# Manual check
24+
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 and reboot node the single pod is running on." "Wait until it comes back and then see if the data is still there and the server is responsive."
25+
inputAndLogResult
26+
27+
# Cleanup
28+
kubectl delete -f $YAMLFILE
29+
waitForKubectl "get pod" $DEPLOYMENT-sngl "" 0 120
30+
or fail "Could not delete deployment."
31+
32+
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 test6b
6+
set -g TESTDESC "Node 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, reboot the node on which the ready single server pod resides." "The node and pod should come back, service should be uninterrupted." "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 test6c
6+
set -g TESTDESC "Node 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, reboot nodes one after another with enough time in between." "They should come back, service should not be interrupted." "Even writes should be possible during the restart." "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)