Skip to content

Commit 2a2c877

Browse files
Randomize application names in tests (#1465)
* feat: Add name template to test manifests * feat: Randomize application names * infra: Add Jinja2 to requirements.txt * feat: Copy YAML files from examples to template-manifests * fix: Remove templating from composition file * fix: Bring back namespace creation for test_force_delete_application * feat: self -> cls in @classmethod functions
1 parent b4571b1 commit 2a2c877

7 files changed

Lines changed: 111 additions & 52 deletions

File tree

tests/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
pyyaml
22
kubernetes
33
bs4
4-
lxml
4+
lxml
5+
Jinja2
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# defines an instance of the HelloWorldService kind
2+
apiVersion: platformapi.kubeplus/v1alpha1
3+
kind: CustomHelloWorldApp
4+
metadata:
5+
name: {{ name }}
6+
spec:
7+
# no specific specs
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: platformapi.kubeplus/v1alpha1
2+
kind: HelloWorldService
3+
metadata:
4+
name: {{ name }}
5+
spec:
6+
greeting: Hello hello hello
7+
replicas: 2
8+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: platformapi.kubeplus/v1alpha1
2+
kind: HelloWorldService
3+
metadata:
4+
name: {{ name }}
5+
spec:
6+
greeting: Hello hello hello
7+
replicas: 1
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: platformapi.kubeplus/v1alpha1
2+
kind: HelloWorldService
3+
metadata:
4+
name: {{ name }}
5+
spec:
6+
greeting: Hello hello hello - hs2
7+
replicas: 1
8+

tests/tenant1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: platformapi.kubeplus/v1alpha1
22
kind: WordpressService
33
metadata:
4-
name: tenant1
4+
name: {{ name }}
55
spec:
66
resourceName: wp-for-tenant1

tests/tests.py

Lines changed: 78 additions & 50 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)