]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
pytests: test_tls_04_double_get does not want stdout separator for multiple responses.
authorYann Ylavic <ylavic@apache.org>
Mon, 20 Mar 2023 15:21:48 +0000 (15:21 +0000)
committerYann Ylavic <ylavic@apache.org>
Mon, 20 Mar 2023 15:21:48 +0000 (15:21 +0000)
Add no_stdout_list parameter to env.tls_get() thus to curl_raw() too.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908577 13f79535-47bb-0310-9956-ffa450edef68

test/modules/tls/env.py
test/modules/tls/test_04_get.py
test/pyhttpd/env.py

index a39fcaaa6478ebede439a441aa0464c8e638ca8b..0e457bf13763e7765e1181e52551410b8f987b5f 100644 (file)
@@ -145,11 +145,11 @@ class TlsTestEnv(HttpdTestEnv):
     def domain_b(self) -> str:
         return self._domain_b
 
-    def tls_get(self, domain, paths: Union[str, List[str]], options: List[str] = None) -> ExecResult:
+    def tls_get(self, domain, paths: Union[str, List[str]], options: List[str] = None, no_stdout_list = False) -> ExecResult:
         if isinstance(paths, str):
             paths = [paths]
         urls = [f"https://{domain}:{self.https_port}{path}" for path in paths]
-        return self.curl_raw(urls=urls, options=options)
+        return self.curl_raw(urls=urls, options=options, no_stdout_list=no_stdout_list)
 
     def tls_get_json(self, domain: str, path: str, options=None):
         r = self.tls_get(domain=domain, paths=path, options=options)
index 4412a66d9a7f6a1fb54ef5c9989840318cea55db..6944381307b5d33b175316f8be6dd4d6b297c7fe 100644 (file)
@@ -59,7 +59,7 @@ class TestGet:
         # we'd like to check that we can do >1 requests on the same connection
         # however curl hides that from us, unless we analyze its verbose output
         docs_a = os.path.join(env.server_docs_dir, env.domain_a)
-        r = env.tls_get(env.domain_a, paths=[
+        r = env.tls_get(env.domain_a, no_stdout_list=True, paths=[
             "/{0}".format(fname),
             "/{0}".format(fname)
         ])
index db20275f438c31263ffd6d5e2c0b27edb0898152..203284469bcc339caf4a0c5c4f5b67b4f042333b 100644 (file)
@@ -530,7 +530,7 @@ class HttpdTestEnv:
             fd.write('\n'.join(self._httpd_base_conf))
             fd.write('\n')
             if self._verbosity >= 2:
-                fd.write(f"LogLevel core:trace5 {self.mpm_module}:trace5\n")
+                fd.write(f"LogLevel core:trace5 {self.mpm_module}:trace5 http:trace5\n")
             if self._log_interesting:
                 fd.write(self._log_interesting)
             fd.write('\n\n')
@@ -745,11 +745,11 @@ class HttpdTestEnv:
         return r
 
     def curl_raw(self, urls, timeout=10, options=None, insecure=False,
-                 force_resolve=True):
+                 force_resolve=True, no_stdout_list=False):
         if not isinstance(urls, list):
             urls = [urls]
         stdout_list = False
-        if len(urls) > 1:
+        if len(urls) > 1 and not no_stdout_list:
             stdout_list = True
         args, headerfile = self.curl_complete_args(
             urls=urls, stdout_list=stdout_list,