Skip to content

Commit c215250

Browse files
committed
create opa test basics
1 parent 1a6bcbf commit c215250

17 files changed

+205
-3
lines changed

tests/templates/kuttl/oidc/10-install-postgresql.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ commands:
66
helm install superset-postgresql
77
--namespace $NAMESPACE
88
--version 12.5.6
9-
-f helm-bitnami-postgresql-values.yaml
9+
-f 10_helm-bitnami-postgresql-values.yaml
1010
--repo https://charts.bitnami.com/bitnami postgresql
1111
--wait
1212
timeout: 600

tests/templates/kuttl/oidc/30-install-keycloak.yaml renamed to tests/templates/kuttl/oidc/30-keycloak.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ commands:
1212
PASSWORD=T8mn72D9 \
1313
CLIENT_ID=superset1 \
1414
CLIENT_SECRET=R1bxHUD569vHeQdw \
15-
envsubst < install-keycloak.yaml | kubectl apply -n $NAMESPACE -f -
15+
envsubst < 30_install-keycloak.yaml | kubectl apply -n $NAMESPACE -f -
1616
1717
INSTANCE_NAME=keycloak2 \
1818
REALM=test2 \
@@ -23,4 +23,4 @@ commands:
2323
PASSWORD=NvfpU518 \
2424
CLIENT_ID=superset2 \
2525
CLIENT_SECRET=scWzh0D4v0GN8NrN \
26-
envsubst < install-keycloak.yaml | kubectl apply -n $NAMESPACE -f -
26+
envsubst < 30_install-keycloak.yaml | kubectl apply -n $NAMESPACE -f -
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestAssert
4+
metadata:
5+
name: test-superset-postgresql
6+
timeout: 480
7+
---
8+
apiVersion: apps/v1
9+
kind: StatefulSet
10+
metadata:
11+
name: superset-postgresql
12+
status:
13+
readyReplicas: 1
14+
replicas: 1
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestStep
4+
commands:
5+
- script: >-
6+
helm install superset-postgresql
7+
--namespace $NAMESPACE
8+
--version 12.5.6
9+
-f helm-bitnami-postgresql-values.yaml
10+
--repo https://charts.bitnami.com/bitnami postgresql
11+
--wait
12+
timeout: 600
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestAssert
4+
metadata:
5+
name: test-keycloak
6+
timeout: 480
7+
---
8+
apiVersion: apps/v1
9+
kind: Deployment
10+
metadata:
11+
name: keycloak1
12+
status:
13+
readyReplicas: 1
14+
replicas: 1
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestStep
4+
commands:
5+
- script: |
6+
INSTANCE_NAME=keycloak1 \
7+
REALM=test1 \
8+
USERNAME=jane.doe \
9+
FIRST_NAME=Jane \
10+
LAST_NAME=Doe \
11+
12+
PASSWORD=T8mn72D9 \
13+
CLIENT_ID=superset1 \
14+
CLIENT_SECRET=R1bxHUD569vHeQdw \
15+
envsubst < install-keycloak.yaml | kubectl apply -n $NAMESPACE -f -
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestAssert
4+
timeout: 300
5+
commands:
6+
- script: kubectl -n $NAMESPACE rollout status daemonset opa-server-default --timeout 300s

0 commit comments

Comments
 (0)