Skip to content

Commit

Permalink
Update NAP DoS test container
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed Mar 23, 2023
1 parent 7ecbbcd commit f3d021d
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 31 deletions.
13 changes: 7 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ pythonpath = [
addopts = "--tb=native -ra --disable-warnings -x -l --profile -v"
log_cli = true
markers =[
"smoke",
"vsr",
"policies",
"vs",
"ts",
"ingresses",
"appprotect",
"dos",
"ingresses",
"policies",
"rewrite",
"skip_for_nginx_oss",
"smoke",
"ts",
"vs",
"vsr",
]
testpaths = [
"tests",
Expand Down
38 changes: 19 additions & 19 deletions tests/data/common/app/dos/app.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
apiVersion: v1
kind: Service
metadata:
name: dos-svc
spec:
selector:
app: dos-server
ports:
- protocol: "TCP"
port: 80
targetPort: 8080
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -27,10 +14,23 @@ spec:
spec:
containers:
- name: dos-server
image: nginxkic/test-dos-server:2.0.0
image: ghcr.io/nginxinc/kic-test-dos-server:0.2.0
imagePullPolicy: IfNotPresent
command: ['sh', '-c', 'python3 /root/webserver.py; tail -f "/dev/null"']
lifecycle:
preStop:
exec:
command: ['sh', '-c', 'python3 /root/webserver.py;']
ports:
- containerPort: 8000
name: http
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: dos-svc
spec:
selector:
app: dos-server
ports:
- name: http
targetPort: 8000
port: 80
protocol: TCP
type: NodePort
2 changes: 1 addition & 1 deletion tests/data/common/app/grpc-vs-mixed/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: greeter
image: ghcr.io/nginxinc/kic-test-grpc-server:0.1.2
image: ghcr.io/nginxinc/kic-test-grpc-server:0.2.0
ports:
- containerPort: 50051
---
Expand Down
4 changes: 2 additions & 2 deletions tests/data/common/app/grpc-vs/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: greeter
image: ghcr.io/nginxinc/kic-test-grpc-server:0.1.2
image: ghcr.io/nginxinc/kic-test-grpc-server:0.2.0
ports:
- containerPort: 50051
---
Expand Down Expand Up @@ -47,7 +47,7 @@ spec:
spec:
containers:
- name: greeter
image: ghcr.io/nginxinc/kic-test-grpc-server:0.1.2
image: ghcr.io/nginxinc/kic-test-grpc-server:0.2.0
ports:
- containerPort: 50051
---
Expand Down
2 changes: 1 addition & 1 deletion tests/data/common/app/grpc/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: greeter
image: ghcr.io/nginxinc/kic-test-grpc-server:0.1.2
image: ghcr.io/nginxinc/kic-test-grpc-server:0.2.0
ports:
- containerPort: 50051
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: tcp-service
image: ghcr.io/nginxinc/kic-test-tcp-server:0.1.2
image: ghcr.io/nginxinc/kic-test-tcp-server:0.2.0
ports:
- containerPort: 3333
name: tcp-server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: udp-service
image: ghcr.io/nginxinc/kic-test-udp-server:0.1.2
image: ghcr.io/nginxinc/kic-test-udp-server:0.2.0
ports:
- containerPort: 3334
name: udp-server
Expand Down
1 change: 1 addition & 0 deletions tests/suite/utils/resources_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ def are_all_pods_in_ready_state(v1: CoreV1Api, namespace) -> bool:
return False
pod_ready_amount = 0
for pod in pods.items:
print(f"Pod {pod.metadata.name} has image {pod.spec.containers[0].image}")
if pod.status.conditions is None:
return False
for condition in pod.status.conditions:
Expand Down

0 comments on commit f3d021d

Please sign in to comment.