Skip to content

Commit afd5dea

Browse files
authored
Merge pull request #252 from arangodb/test/acceptance-dc2dc
Add advanced dc2dc to acceptance test.
2 parents c02b089 + 9019165 commit afd5dea

File tree

3 files changed

+74
-0
lines changed

3 files changed

+74
-0
lines changed

docs/design/acceptance_test.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,3 +472,62 @@ Remove the collections with the replication factor of 1
472472

473473
- [ ] The remaining `Pods` running on the `Node` must be restarted on another `Node`
474474
- [ ] After the `Pods` have restarted, the server must have the same data, except for the removed collections, and be responsive again
475+
476+
### Test 7a: Test DC2DC on 2 clusters, running in the same Kubernetes cluster
477+
478+
This test requires the use of the enterprise image.
479+
480+
Create 2 `ArangoDeployment` of mode `Cluster` and dc2dc enabled.
481+
482+
Hint: Derive from `tests/acceptance/cluster-sync.yaml`, name the deployments `cluster1` and `cluster2`.
483+
484+
Make sure to include a name ('cluster1-to-2`) for an external access package.
485+
486+
```yaml
487+
apiVersion: "database.arangodb.com/v1alpha"
488+
kind: "ArangoDeployment"
489+
metadata:
490+
name: "cluster1"
491+
spec:
492+
mode: Cluster
493+
image: ewoutp/arangodb:3.3.14
494+
sync:
495+
enabled: true
496+
externalAccess:
497+
accessPackageSecretNames: ["cluster1-to-2"]
498+
```
499+
500+
- [ ] The deployments must start
501+
- [ ] The deployments must yield 15 `Pods`
502+
- [ ] The deployments must yield a `Service` named `cluster[1|2]`
503+
- [ ] The deployments must yield a `Service` named `cluster[1|2]-ea`
504+
- [ ] The deployments must yield a `Service` named `cluster[1|2]-sync`
505+
- [ ] The `Services` named `cluster[1|2]-ea` must be accessible from outside (LoadBalancer or NodePort) and show WebUI
506+
507+
Create an `ArangoDeploymentReplication` from `tests/acceptance/cluster12-replication.yaml`.
508+
509+
It will take some time until the synchronization (from `cluster1` to `cluster2`) is configured.
510+
511+
- [ ] The status of the `cluster12-replication` resource shows ....
512+
- [ ] The webUI of `cluster1` shows that you can create a new collection there.
513+
- [ ] The webUI of `cluster2` shows that you cannot create a new collection there.
514+
515+
Create a collection named `testcol` with a replication factor 2 and 3 shards (using the webUI of `cluster1`).
516+
517+
- [ ] The webUI of `cluster2` shows collection `testcol` with the given replication factor and number of shards.
518+
519+
Create multiple documents in the collection named `testcol` (using the webUI of `cluster1`).
520+
521+
- [ ] The documents are visible in webUI of `cluster2`.
522+
523+
Modify multiple documents in the collection named `testcol` (using the webUI of `cluster1`).
524+
525+
- [ ] The modified documents are visible in webUI of `cluster2`.
526+
527+
Remove one or more documents from the collection named `testcol` (using the webUI of `cluster1`).
528+
529+
- [ ] The documents are no longer visible in webUI of `cluster2`.
530+
531+
Create a new database called `db2` (using the webUI of `cluster1`).
532+
533+
- [ ] The webUI of `cluster2` shows database `db2`.

tests/acceptance/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
cluster1.yaml
2+
cluster2.yaml
13
generated
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: "replication.database.arangodb.com/v1alpha"
2+
kind: "ArangoDeploymentReplication"
3+
metadata:
4+
name: "cluster12-replication"
5+
spec:
6+
source:
7+
deploymentName: cluster1
8+
auth:
9+
keyfileSecretName: cluster1-to-2-auth
10+
tls:
11+
caSecretName: cluster1-to-2-ca
12+
destination:
13+
deploymentName: cluster2

0 commit comments

Comments
 (0)