Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tests/acceptance/semiautomation/activefailover.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: "database.arangodb.com/v1alpha"
kind: "ArangoDeployment"
metadata:
name: "acceptance-activefailover"
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
externalAccess:
type: LoadBalancer
mode: ActiveFailover
14 changes: 14 additions & 0 deletions tests/acceptance/semiautomation/cluster-local-storage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: "database.arangodb.com/v1alpha"
kind: "ArangoDeployment"
metadata:
name: "acceptance-cluster"
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
externalAccess:
type: LoadBalancer
mode: Cluster
agents:
storageClassName: acceptance
dbservers:
storageClassName: acceptance
15 changes: 15 additions & 0 deletions tests/acceptance/semiautomation/cluster-sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: "database.arangodb.com/v1alpha"
kind: "ArangoDeployment"
metadata:
name: "acceptance-cluster"
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
externalAccess:
type: LoadBalancer
mode: Cluster
sync:
enabled: true
externalAccess:
type: LoadBalancer
accessPackageSecretNames: ["src-accesspackage"]
14 changes: 14 additions & 0 deletions tests/acceptance/semiautomation/cluster-sync2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: "database.arangodb.com/v1alpha"
kind: "ArangoDeployment"
metadata:
name: "acceptance-cluster2"
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
externalAccess:
type: LoadBalancer
mode: Cluster
sync:
enabled: true
externalAccess:
type: LoadBalancer
10 changes: 10 additions & 0 deletions tests/acceptance/semiautomation/cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: "database.arangodb.com/v1alpha"
kind: "ArangoDeployment"
metadata:
name: "acceptance-cluster"
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
externalAccess:
type: LoadBalancer
mode: Cluster
19 changes: 19 additions & 0 deletions tests/acceptance/semiautomation/helper.fish
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,22 @@ function fail
output "Failed" $argv
exit 1
end

function patchYamlFile
set -l YAMLFILE $argv[1]
set -l IMAGE $argv[2]
set -l ENVIRONMENT $argv[3]
set -l RESULT $argv[4]
cp "$YAMLFILE" "$RESULT"
sed -i "s|@IMAGE@|$IMAGE|" "$RESULT"
sed -i "s|@ENVIRONMENT|$ENVIRONMENT|" "$RESULT"
end

function checkImages
if test -z "$ARANGODB_COMMUNITY" -o -z "$ARANGODB_ENTERPRISE"
echo "Need ARANGODB_COMMUNITY and ARANGODB_ENTERPRISE."
exit 1
end
end

checkImages
9 changes: 9 additions & 0 deletions tests/acceptance/semiautomation/local-storage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: "storage.arangodb.com/v1alpha"
kind: "ArangoLocalStorage"
metadata:
name: "acceptance-local-storage"
spec:
storageClass:
name: acceptance
localPath:
- /var/lib/acceptance-test
10 changes: 10 additions & 0 deletions tests/acceptance/semiautomation/single.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: "database.arangodb.com/v1alpha"
kind: "ArangoDeployment"
metadata:
name: "acceptance-single"
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
externalAccess:
type: LoadBalancer
mode: Single
8 changes: 5 additions & 3 deletions tests/acceptance/semiautomation/test1a.fish
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ source helper.fish

set -g TESTNAME test1a
set -g TESTDESC "Deployment of mode single (development)"
set -g YAMLFILE generated/single-community-dev.yaml
set -g YAMLFILE single.yaml
set -g DEPLOYMENT acceptance-single
printheader

patchYamlFile $YAMLFILE $ARANGODB_COMMUNITY Development work.yaml

# Deploy and check
kubectl apply -f $YAMLFILE
kubectl apply -f work.yaml
and waitForKubectl "get pod" "$DEPLOYMENT-sngl" "1/1 *Running" 1 120
and waitForKubectl "get service" "$DEPLOYMENT *ClusterIP" 8529 1 120
and waitForKubectl "get service" "$DEPLOYMENT-ea *LoadBalancer" "-v;pending" 1 180
Expand All @@ -25,7 +27,7 @@ output "Work" "Now please check external access on this URL with your browser:"
inputAndLogResult

# Cleanup
kubectl delete -f $YAMLFILE
kubectl delete -f work.yaml
waitForKubectl "get pod" $DEPLOYMENT-sngl "" 0 120
or fail "Could not delete deployment."

Expand Down
8 changes: 5 additions & 3 deletions tests/acceptance/semiautomation/test1b.fish
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ source helper.fish

set -g TESTNAME test1b
set -g TESTDESC "Deployment of mode active/failover (development)"
set -g YAMLFILE generated/activefailover-community-dev.yaml
set -g YAMLFILE activefailover.yaml
set -g DEPLOYMENT acceptance-activefailover
printheader

patchYamlFile $YAMLFILE $ARANGODB_COMMUNITY Development work.yaml

# Deploy and check
kubectl apply -f $YAMLFILE
kubectl apply -f work.yaml
and waitForKubectl "get pod" $DEPLOYMENT "1 *Running" 5 120
and waitForKubectl "get pod" "$DEPLOYMENT-sngl.*1/1 *Running" "" 1 120
and waitForKubectl "get pod" "$DEPLOYMENT-sngl.*0/1 *Running" "" 1 120
Expand All @@ -27,7 +29,7 @@ output "Work" "Now please check external access on this URL with your browser:"
inputAndLogResult

# Cleanup
kubectl delete -f $YAMLFILE
kubectl delete -f work.yaml
waitForKubectl "get pod" $DEPLOYMENT "" 0 120
or fail "Could not delete deployment."

Expand Down
8 changes: 5 additions & 3 deletions tests/acceptance/semiautomation/test1c.fish
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ source helper.fish

set -g TESTNAME test1c
set -g TESTDESC "Deployment of mode cluster (development, enterprise)"
set -g YAMLFILE generated/cluster-enterprise-dev.yaml
set -g YAMLFILE cluster.yaml
set -g DEPLOYMENT acceptance-cluster
printheader

patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Development work.yaml

# Deploy and check
kubectl apply -f $YAMLFILE
kubectl apply -f work.yaml
and waitForKubectl "get pod" "$DEPLOYMENT-prmr" "1/1 *Running" 3 120
and waitForKubectl "get pod" "$DEPLOYMENT-agnt" "1/1 *Running" 3 120
and waitForKubectl "get pod" "$DEPLOYMENT-crdn" "1/1 *Running" 3 120
Expand All @@ -27,7 +29,7 @@ output "Work" "Now please check external access on this URL with your browser:"
inputAndLogResult

# Cleanup
kubectl delete -f $YAMLFILE
kubectl delete -f work.yaml
waitForKubectl "get pod" $DEPLOYMENT "" 0 120
or fail "Could not delete deployment."

Expand Down
8 changes: 5 additions & 3 deletions tests/acceptance/semiautomation/test1d.fish
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ source helper.fish

set -g TESTNAME test1d
set -g TESTDESC "Deployment of mode cluster with sync (development, enterprise)"
set -g YAMLFILE generated/cluster-sync-enterprise-dev.yaml
set -g YAMLFILE cluster-sync.yaml
set -g DEPLOYMENT acceptance-cluster
printheader

patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Development work.yaml

# Deploy and check
kubectl apply -f $YAMLFILE
kubectl apply -f work.yaml
and waitForKubectl "get pod" "$DEPLOYMENT" "1/1 *Running" 15 120
and waitForKubectl "get pod" "$DEPLOYMENT-prmr" "1/1 *Running" 3 120
and waitForKubectl "get pod" "$DEPLOYMENT-agnt" "1/1 *Running" 3 120
Expand All @@ -31,7 +33,7 @@ output "Work" "Now please check external access on this URL with your browser:"
inputAndLogResult

# Cleanup
kubectl delete -f $YAMLFILE
kubectl delete -f work.yaml
waitForKubectl "get pod" $DEPLOYMENT "" 0 120
or fail "Could not delete deployment."

Expand Down
10 changes: 6 additions & 4 deletions tests/acceptance/semiautomation/test2a.fish
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
source helper.fish

set -g TESTNAME test2a
set -g TESTDESC "Scale an active failover deployment (enterprise)"
set -g YAMLFILE generated/activefailover-enterprise-dev.yaml
set -g TESTDESC "Scale an active failover deployment (enterprise, development)"
set -g YAMLFILE activefailover.yaml
set -g DEPLOYMENT acceptance-activefailover
printheader

patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Development work.yaml

# Deploy and check
kubectl apply -f $YAMLFILE
kubectl apply -f work.yaml
and waitForKubectl "get pod" $DEPLOYMENT "1 *Running" 5 120
and waitForKubectl "get pod" "$DEPLOYMENT-sngl.*1/1 *Running" "" 1 120
and waitForKubectl "get pod" "$DEPLOYMENT-sngl.*0/1 *Running" "" 1 120
Expand Down Expand Up @@ -43,7 +45,7 @@ output "Work" "Now please check external access on this URL with your browser:"
inputAndLogResult

# Cleanup
kubectl delete -f $YAMLFILE
kubectl delete -f work.yaml
waitForKubectl "get pod" $DEPLOYMENT-sngl "" 0 120
or fail "Could not delete deployment."

Expand Down
8 changes: 5 additions & 3 deletions tests/acceptance/semiautomation/test2b.fish
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ source helper.fish

set -g TESTNAME test2b
set -g TESTDESC "Scale a cluster deployment (development, enterprise)"
set -g YAMLFILE generated/cluster-enterprise-dev.yaml
set -g YAMLFILE cluster.yaml
set -g DEPLOYMENT acceptance-cluster
printheader

patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Development work.yaml

# Deploy and check
kubectl apply -f $YAMLFILE
kubectl apply -f work.yaml
and waitForKubectl "get pod" "$DEPLOYMENT" "1/1 *Running" 9 120
and waitForKubectl "get pod" "$DEPLOYMENT-prmr" "1/1 *Running" 3 120
and waitForKubectl "get pod" "$DEPLOYMENT-agnt" "1/1 *Running" 3 120
Expand Down Expand Up @@ -64,7 +66,7 @@ output "Work" "Now please check external access on this URL with your browser:"
inputAndLogResult

# Cleanup
kubectl delete -f $YAMLFILE
kubectl delete -f work.yaml
and waitForKubectl "get pod" "$DEPLOYMENT" "1/1 *Running" 0 120
or fail "Could not delete deployment."

Expand Down
8 changes: 5 additions & 3 deletions tests/acceptance/semiautomation/test3a.fish
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ source helper.fish

set -g TESTNAME test3a
set -g TESTDESC "Deployment of mode single (production)"
set -g YAMLFILE generated/single-enterprise-pro.yaml
set -g YAMLFILE single.yaml
set -g DEPLOYMENT acceptance-single
printheader

patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Production work.yaml

# Deploy and check
kubectl apply -f $YAMLFILE
kubectl apply -f work.yaml
and waitForKubectl "get pod" "$DEPLOYMENT-sngl" "1/1 *Running" 1 120
and waitForKubectl "get service" "$DEPLOYMENT *ClusterIP" 8529 1 120
and waitForKubectl "get service" "$DEPLOYMENT-ea *LoadBalancer" "-v;pending" 1 180
Expand All @@ -25,7 +27,7 @@ output "Work" "Now please check external access on this URL with your browser:"
inputAndLogResult

# Cleanup
kubectl delete -f $YAMLFILE
kubectl delete -f work.yaml
waitForKubectl "get pod" $DEPLOYMENT-sngl "" 0 120
or fail "Could not delete deployment."

Expand Down
8 changes: 5 additions & 3 deletions tests/acceptance/semiautomation/test3b.fish
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ source helper.fish

set -g TESTNAME test3b
set -g TESTDESC "Deployment of mode active/failover (production)"
set -g YAMLFILE generated/activefailover-community-pro.yaml
set -g YAMLFILE activefailover.yaml
set -g DEPLOYMENT acceptance-activefailover
printheader

patchYamlFile $YAMLFILE $ARANGODB_COMMUNITY Production work.yaml

# Deploy and check
kubectl apply -f $YAMLFILE
kubectl apply -f work.yaml
and waitForKubectl "get pod" $DEPLOYMENT "1 *Running" 5 120
and waitForKubectl "get pod" "$DEPLOYMENT-sngl.*1/1 *Running" "" 1 120
and waitForKubectl "get pod" "$DEPLOYMENT-sngl.*0/1 *Running" "" 1 120
Expand All @@ -27,7 +29,7 @@ output "Work" "Now please check external access on this URL with your browser:"
inputAndLogResult

# Cleanup
kubectl delete -f $YAMLFILE
kubectl delete -f work.yaml
waitForKubectl "get pod" $DEPLOYMENT "" 0 120
or fail "Could not delete deployment."

Expand Down
8 changes: 5 additions & 3 deletions tests/acceptance/semiautomation/test3c.fish
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ source helper.fish

set -g TESTNAME test3c
set -g TESTDESC "Deployment of mode cluster (production, enterprise)"
set -g YAMLFILE generated/cluster-enterprise-pro.yaml
set -g YAMLFILE cluster.yaml
set -g DEPLOYMENT acceptance-cluster
printheader

patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Production work.yaml

# Deploy and check
kubectl apply -f $YAMLFILE
kubectl apply -f work.yaml
and waitForKubectl "get pod" "$DEPLOYMENT-prmr" "1/1 *Running" 3 120
and waitForKubectl "get pod" "$DEPLOYMENT-agnt" "1/1 *Running" 3 120
and waitForKubectl "get pod" "$DEPLOYMENT-crdn" "1/1 *Running" 3 120
Expand All @@ -27,7 +29,7 @@ output "Work" "Now please check external access on this URL with your browser:"
inputAndLogResult

# Cleanup
kubectl delete -f $YAMLFILE
kubectl delete -f work.yaml
waitForKubectl "get pod" $DEPLOYMENT "" 0 120
or fail "Could not delete deployment."

Expand Down
8 changes: 5 additions & 3 deletions tests/acceptance/semiautomation/test3d.fish
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ source helper.fish

set -g TESTNAME test3d
set -g TESTDESC "Scale a cluster deployment (production, enterprise)"
set -g YAMLFILE generated/cluster-enterprise-pro.yaml
set -g YAMLFILE cluster.yaml
set -g DEPLOYMENT acceptance-cluster
printheader

patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Production work.yaml

# Deploy and check
kubectl apply -f $YAMLFILE
kubectl apply -f work.yaml
and waitForKubectl "get pod" "$DEPLOYMENT" "1/1 *Running" 9 120
and waitForKubectl "get pod" "$DEPLOYMENT-prmr" "1/1 *Running" 3 120
and waitForKubectl "get pod" "$DEPLOYMENT-agnt" "1/1 *Running" 3 120
Expand Down Expand Up @@ -64,7 +66,7 @@ output "Work" "Now please check external access on this URL with your browser:"
inputAndLogResult

# Cleanup
kubectl delete -f $YAMLFILE
kubectl delete -f work.yaml
and waitForKubectl "get pod" "$DEPLOYMENT" "1/1 *Running" 0 120
or fail "Could not delete deployment."

Expand Down
Loading