@@ -40,9 +40,9 @@ def setup_method(self):
4040 def teardown_method (self ):
4141 self .s2i_app .cleanup ()
4242
43- def test_run_app_test (self , example_app_test ):
43+ def test_run_app_test (self ):
4444 version = VERSION .replace ("-micro" , "" )
45- cid_file_name = example_app_test .app_name
45+ cid_file_name = self . s2i_app .app_name
4646 # Create container with --user 10001
4747 assert self .s2i_app .create_container (cid_file_name = cid_file_name , container_args = "--user 10001" )
4848 # Wait till container does not start
@@ -59,7 +59,7 @@ def test_run_app_test(self, example_app_test):
5959 # Checks if nginx configuration DO NOT container "DNS_SERVER"
6060 assert not re .search ("DNS_SERVER" , command )
6161 assert PodmanCLIWrapper .podman_run_command (
62- f"--rm { example_app_test .image_name } /bin/bash -c 'nginx -v'"
62+ f"--rm { self . s2i_app .image_name } /bin/bash -c 'nginx -v'"
6363 ).startswith (f"nginx version: nginx/{ version } " )
6464 assert self .s2i_app .test_response (
6565 url = f"http://{ cip } " , expected_output = "NGINX is working"
@@ -111,9 +111,9 @@ def setup_method(self):
111111 def teardown_method (self ):
112112 self .s2i_app .cleanup ()
113113
114- def test_log_output (self , s2i_log_test ):
114+ def test_log_output (self ):
115115 cid_file_name = "test-app"
116- s2i_log_test .set_new_image (image_name = f"{ IMAGE_NAME } -{ cid_file_name } " )
116+ self . s2i_app .set_new_image (image_name = f"{ IMAGE_NAME } -{ cid_file_name } " )
117117 assert self .s2i_app .create_container (
118118 cid_file_name = cid_file_name ,
119119 container_args = "--user 10001"
@@ -124,7 +124,7 @@ def test_log_output(self, s2i_log_test):
124124 assert self .s2i_app .test_response (
125125 url = f"http://{ cip } " , port = 8080 , expected_output = "NGINX is working"
126126 )
127- assert '"GET / HTTP/1.1" 200' in s2i_log_test .get_logs (cid_file_name = cid_file_name )
127+ assert '"GET / HTTP/1.1" 200' in self . s2i_app .get_logs (cid_file_name = cid_file_name )
128128 # Check if /nothing-at-all is really no accessible
129129 assert self .s2i_app .test_response (
130130 url = f"http://{ cip } " , port = 8080 , page = "/nothing-at-all" , expected_code = 404
@@ -134,9 +134,9 @@ def test_log_output(self, s2i_log_test):
134134 # Checks logs container 'failed' and 'No such file or directory'
135135 assert re .search ("open.*failed.*No such file or directory" , logs )
136136
137- def test_log_volume_output (self , s2i_log_test ):
137+ def test_log_volume_output (self ):
138138 cid_file_name = "test-app"
139- s2i_log_test .set_new_image (image_name = f"{ IMAGE_NAME } -{ cid_file_name } " )
139+ self . s2i_app .set_new_image (image_name = f"{ IMAGE_NAME } -{ cid_file_name } " )
140140 assert self .s2i_app .create_container (
141141 cid_file_name = cid_file_name ,
142142 container_args = "-e NGINX_LOG_TO_VOLUME=y --user 10001"
0 commit comments