diff options
Diffstat (limited to 'test/pyhttpd/env.py')
-rw-r--r-- | test/pyhttpd/env.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/pyhttpd/env.py b/test/pyhttpd/env.py index f8d27d04cd..5a2525c92d 100644 --- a/test/pyhttpd/env.py +++ b/test/pyhttpd/env.py @@ -324,6 +324,12 @@ class HttpdTestEnv: for name in self._httpd_log_modules: self._log_interesting += f" {name}:{log_level}" + def check_error_log(self): + errors, warnings = self._error_log.get_missed() + assert (len(errors), len(warnings)) == (0, 0),\ + f"apache logged {len(errors)} errors and {len(warnings)} warnings: \n"\ + "{0}\n{1}\n".format("\n".join(errors), "\n".join(warnings)) + @property def curl(self) -> str: return self._curl @@ -558,6 +564,7 @@ class HttpdTestEnv: return f"{scheme}://{hostname}.{self.http_tld}:{port}{path}" def install_test_conf(self, lines: List[str]): + self.apache_stop() with open(self._test_conf, 'w') as fd: fd.write('\n'.join(self._httpd_base_conf)) fd.write('\n') |