This is an automated email from the ASF dual-hosted git repository.

kichan pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/trafficserver-ingress-controller.git


The following commit(s) were added to refs/heads/master by this push:
     new 0170656  Add debug message to tests (#187)
0170656 is described below

commit 017065663f76dfb3b7ad2521840603ff6911535b
Author: Kit Chan <[email protected]>
AuthorDate: Thu Jan 25 22:02:24 2024 -0800

    Add debug message to tests (#187)
    
    * Update build.yml
    
    * Update test_ingress.py
---
 .github/workflows/build.yml |  6 +++---
 tests/suite/test_ingress.py | 10 ++++++++++
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 08ca155..688297b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -23,19 +23,19 @@ jobs:
 
     steps:
       - name: Checkout
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
         with:
           submodules: 'true'
 
       - name: Setup Minikube
-        uses: manusa/[email protected]
+        uses: manusa/[email protected]
         with:
           minikube version: 'v1.30.1'
           kubernetes version: 'v1.27.9'
           github token: ${{ secrets.GITHUB_TOKEN }}
 
       - name: Set up Python 3.7
-        uses: actions/setup-python@v2
+        uses: actions/setup-python@v5
         with:
           python-version: '3.7'
 
diff --git a/tests/suite/test_ingress.py b/tests/suite/test_ingress.py
index ec11d43..cd7288a 100644
--- a/tests/suite/test_ingress.py
+++ b/tests/suite/test_ingress.py
@@ -44,6 +44,7 @@ def setup_module(module):
     kubectl_apply('data/setup/ingresses/')
     time.sleep(90)
     misc_command('kubectl get all -A')
+    misc_command('kubectl exec -it $(kubectl get pod -n trafficserver-test -o 
name) -n trafficserver-test -- curl -v $(kubectl get service/appsvc1 -n 
trafficserver-test-2 -o jsonpath={.spec.clusterIP}):8080')
 
 def teardown_module(module):
     kubectl_delete('namespace trafficserver-test-3')
@@ -108,6 +109,7 @@ class TestIngress:
     def test_basic_routing_edge_app1(self, minikubeip):
         req_url = "http://"; + minikubeip + ":30080/app1"
         resp = requests.get(req_url, headers={"host": "test.edge.com"})
+        misc_command('kubectl exec -it $(kubectl get pod -n trafficserver-test 
-o name) -n trafficserver-test -- cat /opt/ats/var/log/squid.log')
 
         assert resp.status_code == 200,\
             f"Expected: 200 response code for test_basic_routing"
@@ -116,6 +118,7 @@ class TestIngress:
     def test_basic_routing_media_app1(self, minikubeip):
         req_url = "http://"; + minikubeip + ":30080/app1"
         resp = requests.get(req_url, headers={"host": "test.media.com"})
+        misc_command('kubectl exec -it $(kubectl get pod -n trafficserver-test 
-o name) -n trafficserver-test -- cat /opt/ats/var/log/squid.log')
 
         assert resp.status_code == 200,\
             f"Expected: 200 response code for test_basic_routing"
@@ -124,6 +127,7 @@ class TestIngress:
     def test_basic_routing_edge_app2(self, minikubeip):
         req_url = "http://"; + minikubeip + ":30080/app2"
         resp = requests.get(req_url, headers={"host": "test.edge.com"})
+        misc_command('kubectl exec -it $(kubectl get pod -n trafficserver-test 
-o name) -n trafficserver-test -- cat /opt/ats/var/log/squid.log')
 
         assert resp.status_code == 200,\
             f"Expected: 200 response code for test_basic_routing"
@@ -132,6 +136,7 @@ class TestIngress:
     def test_basic_routing_media_app2(self, minikubeip):
         req_url = "http://"; + minikubeip + ":30080/app2"
         resp = requests.get(req_url, headers={"host": "test.media.com"})
+        misc_command('kubectl exec -it $(kubectl get pod -n trafficserver-test 
-o name) -n trafficserver-test -- cat /opt/ats/var/log/squid.log')
 
         assert resp.status_code == 200,\
             f"Expected: 200 response code for test_basic_routing"
@@ -140,6 +145,7 @@ class TestIngress:
     def test_basic_routing_edge_app2_https(self, minikubeip):
         req_url = "https://"; + minikubeip + ":30443/app2"
         resp = requests.get(req_url, headers={"host": "test.edge.com"}, 
verify=False)
+        misc_command('kubectl exec -it $(kubectl get pod -n trafficserver-test 
-o name) -n trafficserver-test -- cat /opt/ats/var/log/squid.log')
 
         assert resp.status_code == 200,\
             f"Expected: 200 response code for test_basic_routing"
@@ -149,6 +155,7 @@ class TestIngress:
         kubectl_apply('data/ats-ingress-update.yaml')
         req_url = "http://"; + minikubeip + ":30080/app2"
         resp = requests.get(req_url, headers={"host": "test.media.com"})
+        misc_command('kubectl exec -it $(kubectl get pod -n trafficserver-test 
-o name) -n trafficserver-test -- cat /opt/ats/var/log/squid.log')
 
         assert resp.status_code == 200,\
             f"Expected: 200 response code for test_basic_routing"
@@ -158,6 +165,7 @@ class TestIngress:
         kubectl_apply('data/ats-ingress-delete.yaml')
         req_url = "http://"; + minikubeip + ":30080/app2"
         resp = requests.get(req_url, headers={"host": "test.media.com"})
+        misc_command('kubectl exec -it $(kubectl get pod -n trafficserver-test 
-o name) -n trafficserver-test -- cat /opt/ats/var/log/squid.log')
 
         assert resp.status_code == 404,\
             f"Expected: 400 response code for 
test_basic_routing_deleted_ingress"
@@ -166,6 +174,7 @@ class TestIngress:
         kubectl_apply('data/ats-ingress-add.yaml')
         req_url = "http://"; + minikubeip + ":30080/test"
         resp = requests.get(req_url, headers={"host": "test.media.com"})
+        misc_command('kubectl exec -it $(kubectl get pod -n trafficserver-test 
-o name) -n trafficserver-test -- cat /opt/ats/var/log/squid.log')
 
         assert resp.status_code == 200,\
             f"Expected: 200 response code for test_basic_routing"
@@ -175,6 +184,7 @@ class TestIngress:
         kubectl_apply('data/ats-ingress-snippet.yaml')
         req_url = "http://"; + minikubeip + ":30080/app2"
         resp = requests.get(req_url, headers={"host": 
"test.edge.com"},allow_redirects=False)
+        misc_command('kubectl exec -it $(kubectl get pod -n trafficserver-test 
-o name) -n trafficserver-test -- cat /opt/ats/var/log/squid.log')
 
         assert resp.status_code == 301,\
             f"Expected: 301 response code for test_snippet_edge_app2"

Reply via email to