tests - use unique domains for swarm tests

This commit is contained in:
bunkerity 2022-07-15 09:55:18 +02:00
parent 4bd0129e46
commit ea98b453d1
No known key found for this signature in database
GPG Key ID: 3D80806F12602A7C
2 changed files with 85 additions and 2 deletions

View File

@ -52,3 +52,86 @@ spec:
port:
number: 9091
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: app1
labels:
app: app1
spec:
replicas: 1
selector:
matchLabels:
app: app1
template:
metadata:
labels:
app: app1
spec:
containers:
- name: app1
image: tutum/hello-world
---
apiVersion: v1
kind: Service
metadata:
name: svc-app1
spec:
selector:
app: app1
ports:
- protocol: TCP
port: 80
targetPort: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: app2
labels:
app: app2
spec:
replicas: 1
selector:
matchLabels:
app: app2
template:
metadata:
labels:
app: app2
spec:
containers:
- name: app2
image: tutum/hello-world
---
apiVersion: v1
kind: Service
metadata:
name: svc-app2
spec:
selector:
app: app2
ports:
- protocol: TCP
port: 80
targetPort: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: authelia
labels:
app: authelia
spec:
replicas: 1
selector:
matchLabels:
app: authelia
template:
metadata:
labels:
app: authelia
spec:
containers:
- name: authelia
image: authelia/authelia

View File

@ -12,8 +12,8 @@ class SwarmTest(Test) :
def __init__(self, name, timeout, tests) :
super().__init__(name, "swarm", timeout, tests)
self._domains = {
r"www\.example\.com": getenv("TEST_DOMAIN1"),
r"auth\.example\.com": getenv("TEST_DOMAIN1"),
r"www\.example\.com": getenv("TEST_DOMAIN1_1"),
r"auth\.example\.com": getenv("TEST_DOMAIN1_2"),
r"app1\.example\.com": getenv("TEST_DOMAIN1"),
r"app2\.example\.com": getenv("TEST_DOMAIN2"),
r"app3\.example\.com": getenv("TEST_DOMAIN3")