diff options
author | Yann Ylavic <ylavic@apache.org> | 2023-03-20 16:21:48 +0100 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2023-03-20 16:21:48 +0100 |
commit | c043bb537391372a2146985de9d975fcad22f3d4 (patch) | |
tree | ca2afdc98c9f46b3d95ee1e5a96f85df3b6712d6 /test | |
parent | pytests: test_tls_05_proto_1_3: Don't rely on TlsTestEnv.curl_supports_tls_1_... (diff) | |
download | apache2-c043bb537391372a2146985de9d975fcad22f3d4.tar.xz apache2-c043bb537391372a2146985de9d975fcad22f3d4.zip |
pytests: test_tls_04_double_get does not want stdout separator for multiple responses.
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
Diffstat (limited to 'test')
-rw-r--r-- | test/modules/tls/env.py | 4 | ||||
-rw-r--r-- | test/modules/tls/test_04_get.py | 2 | ||||
-rw-r--r-- | test/pyhttpd/env.py | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/test/modules/tls/env.py b/test/modules/tls/env.py index a39fcaaa64..0e457bf137 100644 --- a/test/modules/tls/env.py +++ b/test/modules/tls/env.py @@ -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) diff --git a/test/modules/tls/test_04_get.py b/test/modules/tls/test_04_get.py index 4412a66d9a..6944381307 100644 --- a/test/modules/tls/test_04_get.py +++ b/test/modules/tls/test_04_get.py @@ -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) ]) diff --git a/test/pyhttpd/env.py b/test/pyhttpd/env.py index db20275f43..203284469b 100644 --- a/test/pyhttpd/env.py +++ b/test/pyhttpd/env.py @@ -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, |