Skip to content

Commit

Permalink
Add kuttle e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ben committed Jan 6, 2022
1 parent 2ea405c commit bdf53a4
Show file tree
Hide file tree
Showing 16 changed files with 219 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/e2e/default/00-namespaces.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: kustd-test-a
labels:
loc: a
---
apiVersion: v1
kind: Namespace
metadata:
name: kustd-test-b
labels:
loc: b
---
apiVersion: v1
kind: Namespace
metadata:
name: kustd-test-c
labels:
loc: c
16 changes: 16 additions & 0 deletions tests/e2e/default/01-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: kustd-sync-configmap-test
namespace: kustd-test-b
data:
data: YmxhaA==
---
apiVersion: v1
kind: Secret
metadata:
name: kustd-sync-secret-test
namespace: kustd-test-b
data:
data: YmxhaA==
20 changes: 20 additions & 0 deletions tests/e2e/default/01-create.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: kustd-sync-configmap-test
namespace: kustd-test-a
annotations:
kustd.zdatainc.com/sync: loc=b
data:
data: YmxhaA==
---
apiVersion: v1
kind: Secret
metadata:
name: kustd-sync-secret-test
namespace: kustd-test-a
annotations:
kustd.zdatainc.com/sync: loc=b
data:
data: YmxhaA==
16 changes: 16 additions & 0 deletions tests/e2e/default/01-errors.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: kustd-sync-configmap-test
namespace: kustd-test-c
data:
data: YmxhaA==
---
apiVersion: v1
kind: Secret
metadata:
name: kustd-sync-secret-test
namespace: kustd-test-c
data:
data: YmxhaA==
16 changes: 16 additions & 0 deletions tests/e2e/default/02-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: kustd-sync-configmap-test
namespace: kustd-test-b
data:
data: dGVzdDI=
---
apiVersion: v1
kind: Secret
metadata:
name: kustd-sync-secret-test
namespace: kustd-test-b
data:
data: dGVzdDI=
20 changes: 20 additions & 0 deletions tests/e2e/default/02-update-resource.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: kustd-sync-configmap-test
namespace: kustd-test-a
annotations:
kustd.zdatainc.com/sync: loc=b
data:
data: dGVzdDI=
---
apiVersion: v1
kind: Secret
metadata:
name: kustd-sync-secret-test
namespace: kustd-test-a
annotations:
kustd.zdatainc.com/sync: loc=b
data:
data: dGVzdDI=
16 changes: 16 additions & 0 deletions tests/e2e/default/03-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: kustd-sync-configmap-test
namespace: kustd-test-c
data:
data: dGVzdDI=
---
apiVersion: v1
kind: Secret
metadata:
name: kustd-sync-secret-test
namespace: kustd-test-c
data:
data: dGVzdDI=
16 changes: 16 additions & 0 deletions tests/e2e/default/03-update-sync-ann.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: kustd-sync-configmap-test
namespace: kustd-test-a
annotations:
kustd.zdatainc.com/sync: loc=c
---
apiVersion: v1
kind: Secret
metadata:
name: kustd-sync-secret-test
namespace: kustd-test-a
annotations:
kustd.zdatainc.com/sync: loc=c
16 changes: 16 additions & 0 deletions tests/e2e/default/04-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: kustd-sync-configmap-test
namespace: kustd-test-next
data:
data: dGVzdDI=
---
apiVersion: v1
kind: Secret
metadata:
name: kustd-sync-secret-test
namespace: kustd-test-next
data:
data: dGVzdDI=
7 changes: 7 additions & 0 deletions tests/e2e/default/04-create-ns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: kustd-test-next
labels:
loc: c
12 changes: 12 additions & 0 deletions tests/e2e/default/05-errors.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: kustd-sync-configmap-test
namespace: kustd-test-next
---
apiVersion: v1
kind: Secret
metadata:
name: kustd-sync-secret-test
namespace: kustd-test-next
7 changes: 7 additions & 0 deletions tests/e2e/default/05-update-ns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: kustd-test-next
labels:
loc: b
1 change: 1 addition & 0 deletions tests/e2e/default/06-assert.yaml
7 changes: 7 additions & 0 deletions tests/e2e/default/06-update-ns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: kustd-test-next
labels:
loc: c
12 changes: 12 additions & 0 deletions tests/e2e/default/07-delete.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
apiVersion: kuttl.dev/v1beta1
kind: TestStep
delete:
- apiVersion: v1
kind: Secret
name: kustd-sync-secret-test
namespace: kustd-test-a
- apiVersion: v1
kind: ConfigMap
name: kustd-sync-configmap-test
namespace: kustd-test-a
16 changes: 16 additions & 0 deletions tests/e2e/default/07-errors.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: kustd-sync-configmap-test
namespace: kustd-test-b
data:
data: dGVzdDI=
---
apiVersion: v1
kind: Secret
metadata:
name: kustd-sync-secret-test
namespace: kustd-test-b
data:
data: dGVzdDI=

0 comments on commit bdf53a4

Please sign in to comment.