From 6f1a4f8fc1cfb077a156b59314d22bf8b078d378 Mon Sep 17 00:00:00 2001 From: Max Neunhoeffer Date: Fri, 2 Nov 2018 23:16:56 +0100 Subject: [PATCH 1/5] Fixes. --- tests/acceptance/semiautomation/helper.fish | 2 +- tests/acceptance/semiautomation/test7a.fish | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/acceptance/semiautomation/helper.fish b/tests/acceptance/semiautomation/helper.fish index f22c6a41f..d3f106da9 100644 --- a/tests/acceptance/semiautomation/helper.fish +++ b/tests/acceptance/semiautomation/helper.fish @@ -99,7 +99,7 @@ function patchYamlFile set -l RESULT $argv[4] cp "$YAMLFILE" "$RESULT" sed -i "s|@IMAGE@|$IMAGE|" "$RESULT" - sed -i "s|@ENVIRONMENT|$ENVIRONMENT|" "$RESULT" + sed -i "s|@ENVIRONMENT@|$ENVIRONMENT|" "$RESULT" end function checkImages diff --git a/tests/acceptance/semiautomation/test7a.fish b/tests/acceptance/semiautomation/test7a.fish index d2e542a9e..02354a22d 100755 --- a/tests/acceptance/semiautomation/test7a.fish +++ b/tests/acceptance/semiautomation/test7a.fish @@ -4,9 +4,9 @@ source helper.fish set -g TESTNAME test7a set -g TESTDESC "Deployment of 2 clusters with sync with DC2DC (production, enterprise)" -set -g YAMLFILE cluster-sync.yaml +set -g YAMLFILE cluster-sync1.yaml set -g YAMLFILE2 cluster-sync2.yaml -set -g DEPLOYMENT acceptance-cluster +set -g DEPLOYMENT acceptance-cluster1 set -g DEPLOYMENT2 acceptance-cluster2 printheader From e4e7eb2c246f0bfe1b3366d9308c170288822f5c Mon Sep 17 00:00:00 2001 From: Max Neunhoeffer Date: Fri, 2 Nov 2018 23:18:09 +0100 Subject: [PATCH 2/5] Missing file. --- .../acceptance/semiautomation/cluster-sync1.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/acceptance/semiautomation/cluster-sync1.yaml diff --git a/tests/acceptance/semiautomation/cluster-sync1.yaml b/tests/acceptance/semiautomation/cluster-sync1.yaml new file mode 100644 index 000000000..ba36b5651 --- /dev/null +++ b/tests/acceptance/semiautomation/cluster-sync1.yaml @@ -0,0 +1,15 @@ +apiVersion: "database.arangodb.com/v1alpha" +kind: "ArangoDeployment" +metadata: + name: "acceptance-cluster1" +spec: + environment: @ENVIRONMENT@ + image: @IMAGE@ + externalAccess: + type: LoadBalancer + mode: Cluster + sync: + enabled: true + externalAccess: + type: LoadBalancer + accessPackageSecretNames: ["src-accesspackage"] From 37f31842539b0b1d58c79d22381773778a7924d6 Mon Sep 17 00:00:00 2001 From: Max Neunhoeffer Date: Tue, 6 Nov 2018 10:05:05 +0100 Subject: [PATCH 3/5] Fix check for image names being set. --- tests/acceptance/semiautomation/helper.fish | 2 -- tests/acceptance/semiautomation/test1a.fish | 1 + tests/acceptance/semiautomation/test1b.fish | 1 + tests/acceptance/semiautomation/test1c.fish | 1 + tests/acceptance/semiautomation/test1d.fish | 1 + tests/acceptance/semiautomation/test2a.fish | 1 + tests/acceptance/semiautomation/test2b.fish | 1 + tests/acceptance/semiautomation/test3a.fish | 1 + tests/acceptance/semiautomation/test3b.fish | 1 + tests/acceptance/semiautomation/test3c.fish | 1 + tests/acceptance/semiautomation/test3d.fish | 1 + tests/acceptance/semiautomation/test4a.fish | 1 + tests/acceptance/semiautomation/test4b.fish | 1 + tests/acceptance/semiautomation/test5a.fish | 1 + tests/acceptance/semiautomation/test5b.fish | 1 + tests/acceptance/semiautomation/test5c.fish | 1 + tests/acceptance/semiautomation/test6a.fish | 1 + tests/acceptance/semiautomation/test6b.fish | 1 + tests/acceptance/semiautomation/test6c.fish | 1 + tests/acceptance/semiautomation/test6d.fish | 1 + tests/acceptance/semiautomation/test6e.fish | 1 + tests/acceptance/semiautomation/test6f.fish | 1 + tests/acceptance/semiautomation/test6g.fish | 1 + tests/acceptance/semiautomation/test7a.fish | 1 + 24 files changed, 23 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/semiautomation/helper.fish b/tests/acceptance/semiautomation/helper.fish index d3f106da9..5e0e6a667 100644 --- a/tests/acceptance/semiautomation/helper.fish +++ b/tests/acceptance/semiautomation/helper.fish @@ -108,5 +108,3 @@ function checkImages exit 1 end end - -checkImages diff --git a/tests/acceptance/semiautomation/test1a.fish b/tests/acceptance/semiautomation/test1a.fish index b392bd803..c0f7669e0 100755 --- a/tests/acceptance/semiautomation/test1a.fish +++ b/tests/acceptance/semiautomation/test1a.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test1a set -g TESTDESC "Deployment of mode single (development)" diff --git a/tests/acceptance/semiautomation/test1b.fish b/tests/acceptance/semiautomation/test1b.fish index 86365c842..9083d716a 100755 --- a/tests/acceptance/semiautomation/test1b.fish +++ b/tests/acceptance/semiautomation/test1b.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test1b set -g TESTDESC "Deployment of mode active/failover (development)" diff --git a/tests/acceptance/semiautomation/test1c.fish b/tests/acceptance/semiautomation/test1c.fish index f6767110a..d95f1d2e1 100755 --- a/tests/acceptance/semiautomation/test1c.fish +++ b/tests/acceptance/semiautomation/test1c.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test1c set -g TESTDESC "Deployment of mode cluster (development, enterprise)" diff --git a/tests/acceptance/semiautomation/test1d.fish b/tests/acceptance/semiautomation/test1d.fish index 98361a219..df81e9720 100755 --- a/tests/acceptance/semiautomation/test1d.fish +++ b/tests/acceptance/semiautomation/test1d.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test1d set -g TESTDESC "Deployment of mode cluster with sync (development, enterprise)" diff --git a/tests/acceptance/semiautomation/test2a.fish b/tests/acceptance/semiautomation/test2a.fish index db56d5fa2..7a7551362 100755 --- a/tests/acceptance/semiautomation/test2a.fish +++ b/tests/acceptance/semiautomation/test2a.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test2a set -g TESTDESC "Scale an active failover deployment (enterprise, development)" diff --git a/tests/acceptance/semiautomation/test2b.fish b/tests/acceptance/semiautomation/test2b.fish index 07e49e23c..c0a558d6b 100755 --- a/tests/acceptance/semiautomation/test2b.fish +++ b/tests/acceptance/semiautomation/test2b.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test2b set -g TESTDESC "Scale a cluster deployment (development, enterprise)" diff --git a/tests/acceptance/semiautomation/test3a.fish b/tests/acceptance/semiautomation/test3a.fish index 7447e354f..f0d20b5a6 100755 --- a/tests/acceptance/semiautomation/test3a.fish +++ b/tests/acceptance/semiautomation/test3a.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test3a set -g TESTDESC "Deployment of mode single (production)" diff --git a/tests/acceptance/semiautomation/test3b.fish b/tests/acceptance/semiautomation/test3b.fish index e979888c1..1fb1135da 100755 --- a/tests/acceptance/semiautomation/test3b.fish +++ b/tests/acceptance/semiautomation/test3b.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test3b set -g TESTDESC "Deployment of mode active/failover (production)" diff --git a/tests/acceptance/semiautomation/test3c.fish b/tests/acceptance/semiautomation/test3c.fish index 92e93b51c..5d9025a64 100755 --- a/tests/acceptance/semiautomation/test3c.fish +++ b/tests/acceptance/semiautomation/test3c.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test3c set -g TESTDESC "Deployment of mode cluster (production, enterprise)" diff --git a/tests/acceptance/semiautomation/test3d.fish b/tests/acceptance/semiautomation/test3d.fish index 72e35226b..e99e8dcc5 100755 --- a/tests/acceptance/semiautomation/test3d.fish +++ b/tests/acceptance/semiautomation/test3d.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test3d set -g TESTDESC "Scale a cluster deployment (production, enterprise)" diff --git a/tests/acceptance/semiautomation/test4a.fish b/tests/acceptance/semiautomation/test4a.fish index e1ffb9f44..ef0402545 100755 --- a/tests/acceptance/semiautomation/test4a.fish +++ b/tests/acceptance/semiautomation/test4a.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test4a set -g TESTDESC "Deployment of mode cluster (development, enterprise, local storage)" diff --git a/tests/acceptance/semiautomation/test4b.fish b/tests/acceptance/semiautomation/test4b.fish index ebbe43b3d..c47b8ebd9 100755 --- a/tests/acceptance/semiautomation/test4b.fish +++ b/tests/acceptance/semiautomation/test4b.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test4a set -g TESTDESC "Deployment of mode cluster (development, enterprise, local storage)" diff --git a/tests/acceptance/semiautomation/test5a.fish b/tests/acceptance/semiautomation/test5a.fish index 48ee4ec2d..f8166dd88 100755 --- a/tests/acceptance/semiautomation/test5a.fish +++ b/tests/acceptance/semiautomation/test5a.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test5a set -g TESTDESC "Pod resilience in mode single (production)" diff --git a/tests/acceptance/semiautomation/test5b.fish b/tests/acceptance/semiautomation/test5b.fish index fbbe2004f..5b7b0811a 100755 --- a/tests/acceptance/semiautomation/test5b.fish +++ b/tests/acceptance/semiautomation/test5b.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test5b set -g TESTDESC "Pod resilience in active/failover (production)" diff --git a/tests/acceptance/semiautomation/test5c.fish b/tests/acceptance/semiautomation/test5c.fish index 797eb22a4..4a1ca7148 100755 --- a/tests/acceptance/semiautomation/test5c.fish +++ b/tests/acceptance/semiautomation/test5c.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test5c set -g TESTDESC "Pod resilience in mode cluster (production, enterprise)" diff --git a/tests/acceptance/semiautomation/test6a.fish b/tests/acceptance/semiautomation/test6a.fish index 8f15edaa6..4f2507818 100755 --- a/tests/acceptance/semiautomation/test6a.fish +++ b/tests/acceptance/semiautomation/test6a.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test6a set -g TESTDESC "Node resilience in mode single (production)" diff --git a/tests/acceptance/semiautomation/test6b.fish b/tests/acceptance/semiautomation/test6b.fish index 322f9ea59..60fc5b156 100755 --- a/tests/acceptance/semiautomation/test6b.fish +++ b/tests/acceptance/semiautomation/test6b.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test6b set -g TESTDESC "Node resilience in active/failover (production)" diff --git a/tests/acceptance/semiautomation/test6c.fish b/tests/acceptance/semiautomation/test6c.fish index 6f912280d..d02555964 100755 --- a/tests/acceptance/semiautomation/test6c.fish +++ b/tests/acceptance/semiautomation/test6c.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test6c set -g TESTDESC "Node resilience in mode cluster (production, enterprise)" diff --git a/tests/acceptance/semiautomation/test6d.fish b/tests/acceptance/semiautomation/test6d.fish index adf29b010..0b7b1ae22 100755 --- a/tests/acceptance/semiautomation/test6d.fish +++ b/tests/acceptance/semiautomation/test6d.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test6d set -g TESTDESC "Node resilience in mode single (production)" diff --git a/tests/acceptance/semiautomation/test6e.fish b/tests/acceptance/semiautomation/test6e.fish index 3976278e1..64a0999fa 100755 --- a/tests/acceptance/semiautomation/test6e.fish +++ b/tests/acceptance/semiautomation/test6e.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test6e set -g TESTDESC "Node resilience in active/failover (production)" diff --git a/tests/acceptance/semiautomation/test6f.fish b/tests/acceptance/semiautomation/test6f.fish index a1927a26b..51ed20428 100755 --- a/tests/acceptance/semiautomation/test6f.fish +++ b/tests/acceptance/semiautomation/test6f.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test6f set -g TESTDESC "Node resilience in mode cluster (production, enterprise)" diff --git a/tests/acceptance/semiautomation/test6g.fish b/tests/acceptance/semiautomation/test6g.fish index 7f50bba19..ddeb11560 100755 --- a/tests/acceptance/semiautomation/test6g.fish +++ b/tests/acceptance/semiautomation/test6g.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test6g set -g TESTDESC "Node resilience in active/failover, repl factor 1 (production)" diff --git a/tests/acceptance/semiautomation/test7a.fish b/tests/acceptance/semiautomation/test7a.fish index 02354a22d..ff36c6770 100755 --- a/tests/acceptance/semiautomation/test7a.fish +++ b/tests/acceptance/semiautomation/test7a.fish @@ -1,6 +1,7 @@ #!/usr/bin/fish source helper.fish +checkImages set -g TESTNAME test7a set -g TESTDESC "Deployment of 2 clusters with sync with DC2DC (production, enterprise)" From 8188d3a3fb0affbad1d4dc44f0276e3023acb121 Mon Sep 17 00:00:00 2001 From: Max Neunhoeffer Date: Tue, 6 Nov 2018 10:53:09 +0100 Subject: [PATCH 4/5] Add disableIPv6 switch and try to fix auth for test7a --- tests/acceptance/semiautomation/activefailover.yaml | 1 + tests/acceptance/semiautomation/cluster-local-storage.yaml | 1 + tests/acceptance/semiautomation/cluster-sync.yaml | 1 + tests/acceptance/semiautomation/cluster-sync1.yaml | 2 ++ tests/acceptance/semiautomation/cluster-sync2.yaml | 1 + tests/acceptance/semiautomation/cluster.yaml | 1 + tests/acceptance/semiautomation/helper.fish | 5 +++++ tests/acceptance/semiautomation/replication.yaml | 2 +- tests/acceptance/semiautomation/single.yaml | 1 + 9 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/semiautomation/activefailover.yaml b/tests/acceptance/semiautomation/activefailover.yaml index 32d8acea6..5c030ef57 100644 --- a/tests/acceptance/semiautomation/activefailover.yaml +++ b/tests/acceptance/semiautomation/activefailover.yaml @@ -5,6 +5,7 @@ metadata: spec: environment: @ENVIRONMENT@ image: @IMAGE@ + disableIPv6: @DISABLEIPV6@ externalAccess: type: LoadBalancer mode: ActiveFailover diff --git a/tests/acceptance/semiautomation/cluster-local-storage.yaml b/tests/acceptance/semiautomation/cluster-local-storage.yaml index 1f6b9136c..60fb76cb5 100644 --- a/tests/acceptance/semiautomation/cluster-local-storage.yaml +++ b/tests/acceptance/semiautomation/cluster-local-storage.yaml @@ -5,6 +5,7 @@ metadata: spec: environment: @ENVIRONMENT@ image: @IMAGE@ + disableIPv6: @DISABLEIPV6@ externalAccess: type: LoadBalancer mode: Cluster diff --git a/tests/acceptance/semiautomation/cluster-sync.yaml b/tests/acceptance/semiautomation/cluster-sync.yaml index 0358ee95d..034f49a4d 100644 --- a/tests/acceptance/semiautomation/cluster-sync.yaml +++ b/tests/acceptance/semiautomation/cluster-sync.yaml @@ -5,6 +5,7 @@ metadata: spec: environment: @ENVIRONMENT@ image: @IMAGE@ + disableIPv6: @DISABLEIPV6@ externalAccess: type: LoadBalancer mode: Cluster diff --git a/tests/acceptance/semiautomation/cluster-sync1.yaml b/tests/acceptance/semiautomation/cluster-sync1.yaml index ba36b5651..ec6f913f2 100644 --- a/tests/acceptance/semiautomation/cluster-sync1.yaml +++ b/tests/acceptance/semiautomation/cluster-sync1.yaml @@ -5,6 +5,7 @@ metadata: spec: environment: @ENVIRONMENT@ image: @IMAGE@ + disableIPv6: @DISABLEIPV6@ externalAccess: type: LoadBalancer mode: Cluster @@ -13,3 +14,4 @@ spec: externalAccess: type: LoadBalancer accessPackageSecretNames: ["src-accesspackage"] + masterEndpoint: ["https://src-sync.9hoeffer.de:8629"] diff --git a/tests/acceptance/semiautomation/cluster-sync2.yaml b/tests/acceptance/semiautomation/cluster-sync2.yaml index bfeb39651..ceff2ac2b 100644 --- a/tests/acceptance/semiautomation/cluster-sync2.yaml +++ b/tests/acceptance/semiautomation/cluster-sync2.yaml @@ -5,6 +5,7 @@ metadata: spec: environment: @ENVIRONMENT@ image: @IMAGE@ + disableIPv6: @DISABLEIPV6@ externalAccess: type: LoadBalancer mode: Cluster diff --git a/tests/acceptance/semiautomation/cluster.yaml b/tests/acceptance/semiautomation/cluster.yaml index 94ab5cc6e..a03fe6254 100644 --- a/tests/acceptance/semiautomation/cluster.yaml +++ b/tests/acceptance/semiautomation/cluster.yaml @@ -5,6 +5,7 @@ metadata: spec: environment: @ENVIRONMENT@ image: @IMAGE@ + disableIPv6: @DISABLEIPV6@ externalAccess: type: LoadBalancer mode: Cluster diff --git a/tests/acceptance/semiautomation/helper.fish b/tests/acceptance/semiautomation/helper.fish index 5e0e6a667..5a15f5049 100644 --- a/tests/acceptance/semiautomation/helper.fish +++ b/tests/acceptance/semiautomation/helper.fish @@ -100,6 +100,11 @@ function patchYamlFile cp "$YAMLFILE" "$RESULT" sed -i "s|@IMAGE@|$IMAGE|" "$RESULT" sed -i "s|@ENVIRONMENT@|$ENVIRONMENT|" "$RESULT" + if test -z "$DISABLEIPV6" + sed -i "s|@DISABLEIPV6@|false|" "$RESULT" + else + sed -i "s|@DISABLEIPV6@|true|" "$RESULT" + end end function checkImages diff --git a/tests/acceptance/semiautomation/replication.yaml b/tests/acceptance/semiautomation/replication.yaml index 53a6085f6..8ee60f328 100644 --- a/tests/acceptance/semiautomation/replication.yaml +++ b/tests/acceptance/semiautomation/replication.yaml @@ -4,7 +4,7 @@ metadata: name: "replication-internal" spec: source: - masterEndpoint: ["https://@ADDRESS@:8629"] + masterEndpoint: ["https://src-sync.9hoeffer.de:8629"] auth: keyfileSecretName: src-accesspackage-auth tls: diff --git a/tests/acceptance/semiautomation/single.yaml b/tests/acceptance/semiautomation/single.yaml index 58b5a6b74..910343f61 100644 --- a/tests/acceptance/semiautomation/single.yaml +++ b/tests/acceptance/semiautomation/single.yaml @@ -5,6 +5,7 @@ metadata: spec: environment: @ENVIRONMENT@ image: @IMAGE@ + disableIPv6: @DISABLEIPV6@ externalAccess: type: LoadBalancer mode: Single From 0c4687de30e9936b5e5be600102c407aa9db7bfa Mon Sep 17 00:00:00 2001 From: Max Neunhoeffer Date: Tue, 6 Nov 2018 10:55:14 +0100 Subject: [PATCH 5/5] Redeploy secrets. --- tests/acceptance/semiautomation/test7a.fish | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/acceptance/semiautomation/test7a.fish b/tests/acceptance/semiautomation/test7a.fish index ff36c6770..3e0ecb339 100755 --- a/tests/acceptance/semiautomation/test7a.fish +++ b/tests/acceptance/semiautomation/test7a.fish @@ -38,6 +38,11 @@ and waitForKubectl "get service" "$DEPLOYMENT2-ea *LoadBalancer" "-v;pending" 1 and waitForKubectl "get service" "$DEPLOYMENT2-sync *LoadBalancer" "-v;pending" 1 180 or fail "Deployment did not get ready." +# Deploy secrets separately for sync to pick them up: +kubectl get secret src-accesspackage --template='{{index .data "accessPackage.yaml"}}' | base64 -d > accessPackage.yaml +and kubectl apply -f accessPackage.yaml +or fail "Could not redeploy secrets for replication auth." + # Automatic check set ip (getLoadBalancerIP "$DEPLOYMENT-ea") testArangoDB $ip 120