diff --git a/pyproject.toml b/pyproject.toml index ef12127657..e9c16158f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", diff --git a/tests/data/common/app/dos/app.yaml b/tests/data/common/app/dos/app.yaml index f6b469c986..3fcc8c2164 100644 --- a/tests/data/common/app/dos/app.yaml +++ b/tests/data/common/app/dos/app.yaml @@ -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: @@ -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 diff --git a/tests/data/common/app/grpc-vs-mixed/app.yaml b/tests/data/common/app/grpc-vs-mixed/app.yaml index 539684fa51..0a913f68af 100644 --- a/tests/data/common/app/grpc-vs-mixed/app.yaml +++ b/tests/data/common/app/grpc-vs-mixed/app.yaml @@ -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 --- diff --git a/tests/data/common/app/grpc-vs/app.yaml b/tests/data/common/app/grpc-vs/app.yaml index 9eb8f1c9b1..9a5a744ae0 100644 --- a/tests/data/common/app/grpc-vs/app.yaml +++ b/tests/data/common/app/grpc-vs/app.yaml @@ -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 --- @@ -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 --- diff --git a/tests/data/common/app/grpc/app.yaml b/tests/data/common/app/grpc/app.yaml index 79673c72fe..4a66b1d653 100644 --- a/tests/data/common/app/grpc/app.yaml +++ b/tests/data/common/app/grpc/app.yaml @@ -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 --- diff --git a/tests/data/transport-server-tcp-load-balance/standard/service_deployment.yaml b/tests/data/transport-server-tcp-load-balance/standard/service_deployment.yaml index 3618d11e14..071ee38e7f 100644 --- a/tests/data/transport-server-tcp-load-balance/standard/service_deployment.yaml +++ b/tests/data/transport-server-tcp-load-balance/standard/service_deployment.yaml @@ -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 diff --git a/tests/data/transport-server-udp-load-balance/standard/service_deployment.yaml b/tests/data/transport-server-udp-load-balance/standard/service_deployment.yaml index 208c8133a7..a367e50bf5 100644 --- a/tests/data/transport-server-udp-load-balance/standard/service_deployment.yaml +++ b/tests/data/transport-server-udp-load-balance/standard/service_deployment.yaml @@ -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 diff --git a/tests/suite/test_virtual_server_dos.py b/tests/suite/test_virtual_server_dos.py index 41ad3a45cd..92ae2e5cb4 100644 --- a/tests/suite/test_virtual_server_dos.py +++ b/tests/suite/test_virtual_server_dos.py @@ -61,6 +61,7 @@ def virtual_server_setup_dos(request, kube_apis, ingress_controller_endpoint, te vs_name = create_virtual_server_from_yaml(kube_apis.custom_objects, vs_source, test_namespace) vs_host = get_first_host_from_yaml(vs_source) vs_paths = get_paths_from_vs_yaml(vs_source) + vs_paths[0] += f"good_path.html" if request.param["app_type"]: create_example_app(kube_apis, request.param["app_type"], test_namespace) wait_until_all_pods_are_ready(kube_apis.v1, test_namespace) diff --git a/tests/suite/utils/resources_utils.py b/tests/suite/utils/resources_utils.py index 88cdc9b316..d750f6a475 100644 --- a/tests/suite/utils/resources_utils.py +++ b/tests/suite/utils/resources_utils.py @@ -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: