diff --git a/test/00-setup.yaml b/test/00-setup.yaml deleted file mode 100644 index 7eaa8f8..0000000 --- a/test/00-setup.yaml +++ /dev/null @@ -1,72 +0,0 @@ ---- -apiVersion: v1 -kind: Namespace -metadata: - name: demo ---- -apiVersion: v1 -kind: Secret -metadata: - name: regcred - namespace: demo -type: kubernetes.io/dockerconfigjson -data: - .dockerconfigjson: eyJhdXRocyI6eyJodHRwczovL2luZGV4LmRvY2tlci5pby92MS8iOnsidXNlcm5hbWUiOiJkZXNtbzk5OXIiLCJwYXNzd29yZCI6IlU5QXNlVGF5cUY5UlJCd0l2Q1k0IiwiZW1haWwiOiJqZWFubWFyYy5qaW0uYW5kcmVAZ21haWwuY29tIiwiYXV0aCI6IlpHVnpiVzg1T1RseU9sVTVRWE5sVkdGNWNVWTVVbEpDZDBsMlExazAifX19 ---- -apiVersion: v1 -kind: Secret -metadata: - namespace: demo - name: demo-chap-secret -type: "kubernetes.io/iscsi-chap" -data: - discovery.sendtargets.auth.username: ZGVtbw== - discovery.sendtargets.auth.password: VHJtK1lZaXZvMUNZSGszcGFGVWMrcTdCMmdJPQo= - node.session.auth.username: ZGVtbw== - node.session.auth.password: VHJtK1lZaXZvMUNZSGszcGFGVWMrcTdCMmdJPQo= ---- -apiVersion: v1 -kind: Secret -metadata: - namespace: demo - name: with-envfrom-secret -data: - title: dmVyeXNlY3JldA== ---- -apiVersion: v1 -kind: PersistentVolume -metadata: - name: demo-pv - namespace: demo -spec: - storageClassName: manual - capacity: - storage: 50Mi - accessModes: - - ReadWriteOnce - hostPath: - path: /tmp/demo - type: DirectoryOrCreate ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: demo-pvc - namespace: demo -spec: - storageClassName: manual - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 50Mi ---- -apiVersion: v1 -kind: Secret -metadata: - name: secret-minio - namespace: demo -data: - RESTIC_PASSWORD: bHIyOXhtOTU= - AWS_ACCESS_KEY_ID: SjV4V2NqQ2RzckxpZ2lEZA== - AWS_SECRET_ACCESS_KEY: OVdBMnN1djVtanRLRTdnMkRjNWl5WWtkbDNobGV5UU8= diff --git a/test/02-backupconf.yaml b/test/common/backupconf.yaml similarity index 100% rename from test/02-backupconf.yaml rename to test/common/backupconf.yaml diff --git a/test/01-deployment.yaml b/test/common/deployment.yaml similarity index 100% rename from test/01-deployment.yaml rename to test/common/deployment.yaml diff --git a/test/minio.yaml b/test/common/minio.yaml similarity index 100% rename from test/minio.yaml rename to test/common/minio.yaml diff --git a/test/03-restoresession.yaml b/test/common/restoresession.yaml similarity index 66% rename from test/03-restoresession.yaml rename to test/common/restoresession.yaml index c5a9e78..3041560 100644 --- a/test/03-restoresession.yaml +++ b/test/common/restoresession.yaml @@ -10,22 +10,22 @@ spec: name: backup-demo namespace: demo status: - keep: "" - startTime: "2023-03-20T20:47:08Z" + keep: last + startTime: "2023-03-31T14:21:27Z" state: Success target: - backupType: Online - duration: 3.189468146s - snapshotId: 4730eaad - startTime: "2023-03-20T20:47:08Z" + duration: 1.734652641s + snapshotId: 1d2baf88 + startTime: "2023-03-31T14:21:27Z" state: Success targetKind: Deployment targetName: apache-deployment try: 1 - backupType: Job - duration: 7.509060051s - snapshotId: 4ddc5da1 - startTime: "2023-03-20T20:47:08Z" + duration: 3.072021762s + snapshotId: 748622a4 + startTime: "2023-03-31T14:21:27Z" state: Success targetKind: StatefulSet targetName: postgres-demo diff --git a/test/common/setup.yaml b/test/common/setup.yaml new file mode 100644 index 0000000..7c0f52c --- /dev/null +++ b/test/common/setup.yaml @@ -0,0 +1,32 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: demo +--- +apiVersion: v1 +kind: Secret +metadata: + name: regcred + namespace: demo +type: kubernetes.io/dockerconfigjson +data: + .dockerconfigjson: eyJhdXRocyI6eyJodHRwczovL2luZGV4LmRvY2tlci5pby92MS8iOnsidXNlcm5hbWUiOiJkZXNtbzk5OXIiLCJwYXNzd29yZCI6IlU5QXNlVGF5cUY5UlJCd0l2Q1k0IiwiZW1haWwiOiJqZWFubWFyYy5qaW0uYW5kcmVAZ21haWwuY29tIiwiYXV0aCI6IlpHVnpiVzg1T1RseU9sVTVRWE5sVkdGNWNVWTVVbEpDZDBsMlExazAifX19 +--- +apiVersion: v1 +kind: Secret +metadata: + namespace: demo + name: with-envfrom-secret +data: + title: dmVyeXNlY3JldA== +--- +apiVersion: v1 +kind: Secret +metadata: + name: secret-minio + namespace: demo +data: + RESTIC_PASSWORD: bHIyOXhtOTU= + AWS_ACCESS_KEY_ID: SjV4V2NqQ2RzckxpZ2lEZA== + AWS_SECRET_ACCESS_KEY: OVdBMnN1djVtanRLRTdnMkRjNWl5WWtkbDNobGV5UU8= diff --git a/test/minikube/003-minio.yaml b/test/minikube/003-minio.yaml new file mode 120000 index 0000000..52a9418 --- /dev/null +++ b/test/minikube/003-minio.yaml @@ -0,0 +1 @@ +../common/minio.yaml \ No newline at end of file diff --git a/test/minikube/005-setup.yaml b/test/minikube/005-setup.yaml new file mode 120000 index 0000000..2322cfc --- /dev/null +++ b/test/minikube/005-setup.yaml @@ -0,0 +1 @@ +../common/setup.yaml \ No newline at end of file diff --git a/test/minikube/010-pvc.yaml b/test/minikube/010-pvc.yaml new file mode 100644 index 0000000..3151967 --- /dev/null +++ b/test/minikube/010-pvc.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: demo-pvc + namespace: demo +spec: + storageClassName: manual + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 50Mi + storageClassName: csi-hostpath-sc diff --git a/test/minikube/020-deployment.yaml b/test/minikube/020-deployment.yaml new file mode 120000 index 0000000..2eec0f2 --- /dev/null +++ b/test/minikube/020-deployment.yaml @@ -0,0 +1 @@ +../common/deployment.yaml \ No newline at end of file diff --git a/test/minikube/030-backupconf.yaml b/test/minikube/030-backupconf.yaml new file mode 120000 index 0000000..19a1daf --- /dev/null +++ b/test/minikube/030-backupconf.yaml @@ -0,0 +1 @@ +../common/backupconf.yaml \ No newline at end of file diff --git a/test/minikube/040-restoresession.yaml b/test/minikube/040-restoresession.yaml new file mode 120000 index 0000000..a66989b --- /dev/null +++ b/test/minikube/040-restoresession.yaml @@ -0,0 +1 @@ +common/restoresession.yaml \ No newline at end of file