You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2023/03/20 15:21:48 UTC

svn commit: r1908577 - in /httpd/httpd/trunk/test: modules/tls/env.py modules/tls/test_04_get.py pyhttpd/env.py

Author: ylavic
Date: Mon Mar 20 15:21:48 2023
New Revision: 1908577

URL: http://svn.apache.org/viewvc?rev=1908577&view=rev
Log:
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.


Modified:
    httpd/httpd/trunk/test/modules/tls/env.py
    httpd/httpd/trunk/test/modules/tls/test_04_get.py
    httpd/httpd/trunk/test/pyhttpd/env.py

Modified: httpd/httpd/trunk/test/modules/tls/env.py
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/modules/tls/env.py?rev=1908577&r1=1908576&r2=1908577&view=diff
==============================================================================
--- httpd/httpd/trunk/test/modules/tls/env.py (original)
+++ httpd/httpd/trunk/test/modules/tls/env.py Mon Mar 20 15:21:48 2023
@@ -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)

Modified: httpd/httpd/trunk/test/modules/tls/test_04_get.py
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/modules/tls/test_04_get.py?rev=1908577&r1=1908576&r2=1908577&view=diff
==============================================================================
--- httpd/httpd/trunk/test/modules/tls/test_04_get.py (original)
+++ httpd/httpd/trunk/test/modules/tls/test_04_get.py Mon Mar 20 15:21:48 2023
@@ -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)
         ])

Modified: httpd/httpd/trunk/test/pyhttpd/env.py
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/pyhttpd/env.py?rev=1908577&r1=1908576&r2=1908577&view=diff
==============================================================================
--- httpd/httpd/trunk/test/pyhttpd/env.py (original)
+++ httpd/httpd/trunk/test/pyhttpd/env.py Mon Mar 20 15:21:48 2023
@@ -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,