@@ -42,7 +42,9 @@ def rewrite_target_setup(
4242 ingress_controller ,
4343 test_namespace ,
4444) -> RewriteTargetSetup :
45- print ("------------------------- Deploy Ingress with rewrite-target annotations -----------------------------------" )
45+ print (
46+ "------------------------- Deploy Ingress with rewrite-target annotations -----------------------------------"
47+ )
4648 src = f"{ TEST_DATA } /rewrite-target/{ request .param } .yaml"
4749 create_items_from_yaml (kube_apis , src , test_namespace )
4850 ingress_name = get_name_from_yaml (src )
@@ -82,12 +84,14 @@ def test_static_rewrite_target(self, rewrite_target_setup):
8284 Test static rewrite target functionality.
8385 Request to /app should be rewritten to /backend.
8486 """
85- request_url = f"http://{ rewrite_target_setup .public_endpoint .public_ip } :{ rewrite_target_setup .public_endpoint .port } /app"
87+ request_url = (
88+ f"http://{ rewrite_target_setup .public_endpoint .public_ip } :{ rewrite_target_setup .public_endpoint .port } /app"
89+ )
8690 resp = requests .get (
8791 request_url ,
8892 headers = {"host" : rewrite_target_setup .ingress_host },
8993 )
90-
94+
9195 assert resp .status_code == 200
9296 assert "URI: /backend" in resp .text
9397
@@ -102,6 +106,6 @@ def test_regex_rewrite_target(self, rewrite_target_setup):
102106 request_url ,
103107 headers = {"host" : rewrite_target_setup .ingress_host },
104108 )
105-
109+
106110 assert resp .status_code == 200
107- assert "URI: /api/users/123" in resp .text
111+ assert "URI: /api/users/123" in resp .text
0 commit comments