Skip to content

Commit 1d27837

Browse files
committed
wip: integration tests
1 parent bd97146 commit 1d27837

File tree

3 files changed

+109
-0
lines changed

3 files changed

+109
-0
lines changed
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: install-test-container
6+
timeout: 300
7+
---
8+
apiVersion: apps/v1
9+
kind: StatefulSet
10+
metadata:
11+
name: python
12+
status:
13+
readyReplicas: 1
14+
replicas: 1
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: python
6+
---
7+
kind: Role
8+
apiVersion: rbac.authorization.k8s.io/v1
9+
metadata:
10+
name: python
11+
{% if test_scenario['values']['openshift'] == 'true' %}
12+
rules:
13+
- apiGroups: ["security.openshift.io"]
14+
resources: ["securitycontextconstraints"]
15+
resourceNames: ["privileged"]
16+
verbs: ["use"]
17+
{% endif %}
18+
---
19+
kind: RoleBinding
20+
apiVersion: rbac.authorization.k8s.io/v1
21+
metadata:
22+
name: python
23+
subjects:
24+
- kind: ServiceAccount
25+
name: python
26+
roleRef:
27+
kind: Role
28+
name: python
29+
apiGroup: rbac.authorization.k8s.io
30+
---
31+
apiVersion: kuttl.dev/v1beta1
32+
kind: TestStep
33+
metadata:
34+
name: install-test-container
35+
timeout: 300
36+
---
37+
apiVersion: apps/v1
38+
kind: StatefulSet
39+
metadata:
40+
name: python
41+
labels:
42+
app: python
43+
spec:
44+
replicas: 1
45+
selector:
46+
matchLabels:
47+
app: python
48+
template:
49+
metadata:
50+
labels:
51+
app: python
52+
spec:
53+
serviceAccountName: python
54+
securityContext:
55+
fsGroup: 1000
56+
containers:
57+
- name: python
58+
image: docker.stackable.tech/stackable/testing-tools:0.2.0-stackable0.0.0-dev
59+
stdin: true
60+
tty: true
61+
resources:
62+
requests:
63+
memory: "128Mi"
64+
cpu: "512m"
65+
limits:
66+
memory: "128Mi"
67+
cpu: "1"
68+
volumeMounts:
69+
- name: tls
70+
mountPath: /stackable/tls
71+
env:
72+
- name: REQUESTS_CA_BUNDLE
73+
value: /stackable/tls/ca.crt
74+
volumes:
75+
- name: tls
76+
csi:
77+
driver: secrets.stackable.tech
78+
volumeAttributes:
79+
secrets.stackable.tech/class: tls
80+
secrets.stackable.tech/scope: pod
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: TestAssert
4+
metadata:
5+
name: login
6+
timeout: 300
7+
commands:
8+
- script: |
9+
kubectl exec -n $NAMESPACE python-0 -- curl https://superset-node-default.default.svc.8088 --insecure -d '{
10+
"username": "newuser",
11+
"first_name": "New",
12+
"last_name": "User",
13+
"email": "[email protected]",
14+
"roles": ["Public"]
15+
}'

0 commit comments

Comments
 (0)