From 79bdd6be69a0ec2a54c1efe09dca63622b1d0f7a Mon Sep 17 00:00:00 2001 From: lamai93 Date: Thu, 4 Apr 2019 10:53:05 +0200 Subject: [PATCH 1/2] Added license key to semi automation acceptance tests. --- tests/acceptance/semiautomation/activefailover.yaml | 2 ++ .../acceptance/semiautomation/cluster-local-storage.yaml | 2 ++ tests/acceptance/semiautomation/cluster-sync.yaml | 2 ++ tests/acceptance/semiautomation/cluster-sync1.yaml | 2 ++ tests/acceptance/semiautomation/cluster-sync2.yaml | 2 ++ tests/acceptance/semiautomation/cluster.yaml | 2 ++ tests/acceptance/semiautomation/helper.fish | 9 +++++++++ tests/acceptance/semiautomation/single.yaml | 2 ++ tests/acceptance/semiautomation/test1a.fish | 3 +++ tests/acceptance/semiautomation/test1c.fish | 3 +++ tests/acceptance/semiautomation/test1d.fish | 3 +++ tests/acceptance/semiautomation/test2a.fish | 3 +++ tests/acceptance/semiautomation/test2b.fish | 3 +++ tests/acceptance/semiautomation/test3a.fish | 3 +++ tests/acceptance/semiautomation/test3c.fish | 3 +++ tests/acceptance/semiautomation/test3d.fish | 3 +++ tests/acceptance/semiautomation/test4a.fish | 3 +++ tests/acceptance/semiautomation/test4b.fish | 3 +++ tests/acceptance/semiautomation/test5a.fish | 4 ++++ tests/acceptance/semiautomation/test5b.fish | 4 ++++ tests/acceptance/semiautomation/test5c.fish | 3 +++ tests/acceptance/semiautomation/test6a.fish | 3 +++ tests/acceptance/semiautomation/test6b.fish | 3 +++ tests/acceptance/semiautomation/test6c.fish | 3 +++ tests/acceptance/semiautomation/test6d.fish | 3 +++ tests/acceptance/semiautomation/test6e.fish | 3 +++ tests/acceptance/semiautomation/test6f.fish | 3 +++ tests/acceptance/semiautomation/test6g.fish | 3 +++ tests/acceptance/semiautomation/test7a.fish | 3 +++ 29 files changed, 88 insertions(+) diff --git a/tests/acceptance/semiautomation/activefailover.yaml b/tests/acceptance/semiautomation/activefailover.yaml index 5c030ef57..c32869a90 100644 --- a/tests/acceptance/semiautomation/activefailover.yaml +++ b/tests/acceptance/semiautomation/activefailover.yaml @@ -8,4 +8,6 @@ spec: disableIPv6: @DISABLEIPV6@ externalAccess: type: LoadBalancer + license: + secretName: arangodb-license-key mode: ActiveFailover diff --git a/tests/acceptance/semiautomation/cluster-local-storage.yaml b/tests/acceptance/semiautomation/cluster-local-storage.yaml index 60fb76cb5..ac728f37e 100644 --- a/tests/acceptance/semiautomation/cluster-local-storage.yaml +++ b/tests/acceptance/semiautomation/cluster-local-storage.yaml @@ -9,6 +9,8 @@ spec: externalAccess: type: LoadBalancer mode: Cluster + license: + secretName: arangodb-license-key agents: storageClassName: acceptance dbservers: diff --git a/tests/acceptance/semiautomation/cluster-sync.yaml b/tests/acceptance/semiautomation/cluster-sync.yaml index 034f49a4d..8f42e2ed9 100644 --- a/tests/acceptance/semiautomation/cluster-sync.yaml +++ b/tests/acceptance/semiautomation/cluster-sync.yaml @@ -9,6 +9,8 @@ spec: externalAccess: type: LoadBalancer mode: Cluster + license: + secretName: arangodb-license-key sync: enabled: true externalAccess: diff --git a/tests/acceptance/semiautomation/cluster-sync1.yaml b/tests/acceptance/semiautomation/cluster-sync1.yaml index ec6f913f2..b587fa641 100644 --- a/tests/acceptance/semiautomation/cluster-sync1.yaml +++ b/tests/acceptance/semiautomation/cluster-sync1.yaml @@ -9,6 +9,8 @@ spec: externalAccess: type: LoadBalancer mode: Cluster + license: + secretName: arangodb-license-key sync: enabled: true externalAccess: diff --git a/tests/acceptance/semiautomation/cluster-sync2.yaml b/tests/acceptance/semiautomation/cluster-sync2.yaml index ceff2ac2b..7472c9f86 100644 --- a/tests/acceptance/semiautomation/cluster-sync2.yaml +++ b/tests/acceptance/semiautomation/cluster-sync2.yaml @@ -9,6 +9,8 @@ spec: externalAccess: type: LoadBalancer mode: Cluster + license: + secretName: arangodb-license-key sync: enabled: true externalAccess: diff --git a/tests/acceptance/semiautomation/cluster.yaml b/tests/acceptance/semiautomation/cluster.yaml index a03fe6254..9c43617fe 100644 --- a/tests/acceptance/semiautomation/cluster.yaml +++ b/tests/acceptance/semiautomation/cluster.yaml @@ -8,4 +8,6 @@ spec: disableIPv6: @DISABLEIPV6@ externalAccess: type: LoadBalancer + license: + secretName: arangodb-license-key mode: Cluster diff --git a/tests/acceptance/semiautomation/helper.fish b/tests/acceptance/semiautomation/helper.fish index b932ea022..17872c06b 100644 --- a/tests/acceptance/semiautomation/helper.fish +++ b/tests/acceptance/semiautomation/helper.fish @@ -49,6 +49,15 @@ function output for l in $argv[2..-1] ; echo $l ; end end +function ensureLicenseKey + if test -z "$ARANGO_LICENSE_KEY" + echo "Need ARANGO_LICENSE_KEY for enterprise image." + exit 1 + end + kubectl get secret arangodb-license-key ; or kubectl create secret generic arangodb-license-key \ + --from-literal=token="$ARANGO_LICENSE_KEY" > /dev/null +end + function log echo "$argv[1] Test: $TESTNAME, Desc: $TESTDESC" >> testprotocol.log end diff --git a/tests/acceptance/semiautomation/single.yaml b/tests/acceptance/semiautomation/single.yaml index 910343f61..62115f8fc 100644 --- a/tests/acceptance/semiautomation/single.yaml +++ b/tests/acceptance/semiautomation/single.yaml @@ -8,4 +8,6 @@ spec: disableIPv6: @DISABLEIPV6@ externalAccess: type: LoadBalancer + license: + secretName: arangodb-license-key mode: Single diff --git a/tests/acceptance/semiautomation/test1a.fish b/tests/acceptance/semiautomation/test1a.fish index 3fc40807e..80da9c55b 100755 --- a/tests/acceptance/semiautomation/test1a.fish +++ b/tests/acceptance/semiautomation/test1a.fish @@ -11,6 +11,9 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_COMMUNITY Development work.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" "$DEPLOYMENT-sngl" "1/1 *Running" 1 2 diff --git a/tests/acceptance/semiautomation/test1c.fish b/tests/acceptance/semiautomation/test1c.fish index 08047fa0c..356c41337 100755 --- a/tests/acceptance/semiautomation/test1c.fish +++ b/tests/acceptance/semiautomation/test1c.fish @@ -11,6 +11,9 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Development work.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" "$DEPLOYMENT-prmr" "1/1 *Running" 3 2 diff --git a/tests/acceptance/semiautomation/test1d.fish b/tests/acceptance/semiautomation/test1d.fish index 1e54c002e..8cc87807d 100755 --- a/tests/acceptance/semiautomation/test1d.fish +++ b/tests/acceptance/semiautomation/test1d.fish @@ -11,6 +11,9 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Development work.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" "$DEPLOYMENT" "1/1 *Running" 15 2 diff --git a/tests/acceptance/semiautomation/test2a.fish b/tests/acceptance/semiautomation/test2a.fish index 53eeb1232..608289c5c 100755 --- a/tests/acceptance/semiautomation/test2a.fish +++ b/tests/acceptance/semiautomation/test2a.fish @@ -11,6 +11,9 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Development work.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" $DEPLOYMENT "1 *Running" 5 2 diff --git a/tests/acceptance/semiautomation/test2b.fish b/tests/acceptance/semiautomation/test2b.fish index 05ad886b4..58d509ffa 100755 --- a/tests/acceptance/semiautomation/test2b.fish +++ b/tests/acceptance/semiautomation/test2b.fish @@ -11,6 +11,9 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Development work.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" "$DEPLOYMENT" "1/1 *Running" 9 2 diff --git a/tests/acceptance/semiautomation/test3a.fish b/tests/acceptance/semiautomation/test3a.fish index a6f03b0c7..e51b0cbff 100755 --- a/tests/acceptance/semiautomation/test3a.fish +++ b/tests/acceptance/semiautomation/test3a.fish @@ -11,6 +11,9 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Production work.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" "$DEPLOYMENT-sngl" "1/1 *Running" 1 2 diff --git a/tests/acceptance/semiautomation/test3c.fish b/tests/acceptance/semiautomation/test3c.fish index bdc1928ec..3ad1e2938 100755 --- a/tests/acceptance/semiautomation/test3c.fish +++ b/tests/acceptance/semiautomation/test3c.fish @@ -11,6 +11,9 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Production work.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" "$DEPLOYMENT-prmr" "1/1 *Running" 3 2 diff --git a/tests/acceptance/semiautomation/test3d.fish b/tests/acceptance/semiautomation/test3d.fish index 6391de896..062f3520e 100755 --- a/tests/acceptance/semiautomation/test3d.fish +++ b/tests/acceptance/semiautomation/test3d.fish @@ -11,6 +11,9 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Production work.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" "$DEPLOYMENT" "1/1 *Running" 9 2 diff --git a/tests/acceptance/semiautomation/test4a.fish b/tests/acceptance/semiautomation/test4a.fish index 2d84099dc..98f2042af 100755 --- a/tests/acceptance/semiautomation/test4a.fish +++ b/tests/acceptance/semiautomation/test4a.fish @@ -12,6 +12,9 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Development work.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy local storage: kubectl apply -f $YAMLFILESTORAGE and waitForKubectl "get storageclass" "acceptance.*arangodb.*localstorage" "" 1 1 diff --git a/tests/acceptance/semiautomation/test4b.fish b/tests/acceptance/semiautomation/test4b.fish index 19431ca03..116568bb5 100755 --- a/tests/acceptance/semiautomation/test4b.fish +++ b/tests/acceptance/semiautomation/test4b.fish @@ -12,6 +12,9 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Development work.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy local storage: kubectl apply -f $YAMLFILESTORAGE and waitForKubectl "get storageclass" "acceptance.*arangodb.*localstorage" "" 1 1 diff --git a/tests/acceptance/semiautomation/test5a.fish b/tests/acceptance/semiautomation/test5a.fish index 3f0a40635..2d451cb0d 100755 --- a/tests/acceptance/semiautomation/test5a.fish +++ b/tests/acceptance/semiautomation/test5a.fish @@ -11,6 +11,10 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_COMMUNITY Production work.yaml +# Ensure enterprise license key +ensureLicenseKey + + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" "$DEPLOYMENT-sngl" "1/1 *Running" 1 2 diff --git a/tests/acceptance/semiautomation/test5b.fish b/tests/acceptance/semiautomation/test5b.fish index fa43b4c4a..8fcbf247f 100755 --- a/tests/acceptance/semiautomation/test5b.fish +++ b/tests/acceptance/semiautomation/test5b.fish @@ -11,6 +11,10 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_COMMUNITY Production work.yaml +# Ensure enterprise license key +ensureLicenseKey + + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" $DEPLOYMENT "1 *Running" 5 2 diff --git a/tests/acceptance/semiautomation/test5c.fish b/tests/acceptance/semiautomation/test5c.fish index f8452c698..5843afee2 100755 --- a/tests/acceptance/semiautomation/test5c.fish +++ b/tests/acceptance/semiautomation/test5c.fish @@ -11,6 +11,9 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Production work.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" "$DEPLOYMENT-prmr" "1/1 *Running" 3 2 diff --git a/tests/acceptance/semiautomation/test6a.fish b/tests/acceptance/semiautomation/test6a.fish index 345e342f7..be901578d 100755 --- a/tests/acceptance/semiautomation/test6a.fish +++ b/tests/acceptance/semiautomation/test6a.fish @@ -11,6 +11,9 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_COMMUNITY Production work.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" "$DEPLOYMENT-sngl" "1/1 *Running" 1 2 diff --git a/tests/acceptance/semiautomation/test6b.fish b/tests/acceptance/semiautomation/test6b.fish index 8700b4b98..408320d4e 100755 --- a/tests/acceptance/semiautomation/test6b.fish +++ b/tests/acceptance/semiautomation/test6b.fish @@ -11,6 +11,9 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_COMMUNITY Production work.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" $DEPLOYMENT "1 *Running" 5 2 diff --git a/tests/acceptance/semiautomation/test6c.fish b/tests/acceptance/semiautomation/test6c.fish index a76ca88ac..ac46559b0 100755 --- a/tests/acceptance/semiautomation/test6c.fish +++ b/tests/acceptance/semiautomation/test6c.fish @@ -11,6 +11,9 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Production work.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" "$DEPLOYMENT-prmr" "1/1 *Running" 3 2 diff --git a/tests/acceptance/semiautomation/test6d.fish b/tests/acceptance/semiautomation/test6d.fish index 289c6e8d5..f5399f665 100755 --- a/tests/acceptance/semiautomation/test6d.fish +++ b/tests/acceptance/semiautomation/test6d.fish @@ -11,6 +11,9 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_COMMUNITY Production work.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" "$DEPLOYMENT-sngl" "1/1 *Running" 1 2 diff --git a/tests/acceptance/semiautomation/test6e.fish b/tests/acceptance/semiautomation/test6e.fish index 8424924a5..ca9535b7d 100755 --- a/tests/acceptance/semiautomation/test6e.fish +++ b/tests/acceptance/semiautomation/test6e.fish @@ -11,6 +11,9 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_COMMUNITY Production work.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" $DEPLOYMENT "1 *Running" 5 2 diff --git a/tests/acceptance/semiautomation/test6f.fish b/tests/acceptance/semiautomation/test6f.fish index 728e6c82c..71d8ab12c 100755 --- a/tests/acceptance/semiautomation/test6f.fish +++ b/tests/acceptance/semiautomation/test6f.fish @@ -11,6 +11,9 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Production work.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" "$DEPLOYMENT-prmr" "1/1 *Running" 3 2 diff --git a/tests/acceptance/semiautomation/test6g.fish b/tests/acceptance/semiautomation/test6g.fish index a5506a6d3..3b0e50d6f 100755 --- a/tests/acceptance/semiautomation/test6g.fish +++ b/tests/acceptance/semiautomation/test6g.fish @@ -12,6 +12,9 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Development work.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy local storage: kubectl apply -f $YAMLFILESTORAGE and waitForKubectl "get storageclass" "acceptance.*arangodb.*localstorage" "" 1 1 diff --git a/tests/acceptance/semiautomation/test7a.fish b/tests/acceptance/semiautomation/test7a.fish index 237aec924..880d70d53 100755 --- a/tests/acceptance/semiautomation/test7a.fish +++ b/tests/acceptance/semiautomation/test7a.fish @@ -15,6 +15,9 @@ patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Production work.yaml patchYamlFile $YAMLFILE2 $ARANGODB_ENTERPRISE Production work2.yaml cp replication.yaml work3.yaml +# Ensure enterprise license key +ensureLicenseKey + # Deploy and check kubectl apply -f work.yaml kubectl apply -f work2.yaml From 029d8195e4dd0b769872382064a351d3aaa94e3c Mon Sep 17 00:00:00 2001 From: lamai93 Date: Thu, 4 Apr 2019 10:57:32 +0200 Subject: [PATCH 2/2] Updated missing tests. --- tests/acceptance/semiautomation/test1b.fish | 4 ++++ tests/acceptance/semiautomation/test3b.fish | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/tests/acceptance/semiautomation/test1b.fish b/tests/acceptance/semiautomation/test1b.fish index 097670ccd..44abd6bfa 100755 --- a/tests/acceptance/semiautomation/test1b.fish +++ b/tests/acceptance/semiautomation/test1b.fish @@ -11,6 +11,10 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_COMMUNITY Development work.yaml +# Ensure enterprise license key +ensureLicenseKey + + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" $DEPLOYMENT "1 *Running" 5 2 diff --git a/tests/acceptance/semiautomation/test3b.fish b/tests/acceptance/semiautomation/test3b.fish index 3641dcc50..9605fc867 100755 --- a/tests/acceptance/semiautomation/test3b.fish +++ b/tests/acceptance/semiautomation/test3b.fish @@ -11,6 +11,10 @@ printheader patchYamlFile $YAMLFILE $ARANGODB_COMMUNITY Production work.yaml +# Ensure enterprise license key +ensureLicenseKey + + # Deploy and check kubectl apply -f work.yaml and waitForKubectl "get pod" $DEPLOYMENT "1 *Running" 5 2