diff --git a/examples/cors/setup-linux.sh b/examples/cors/setup-linux.sh index f145010f..37ad3e8a 100755 --- a/examples/cors/setup-linux.sh +++ b/examples/cors/setup-linux.sh @@ -9,4 +9,3 @@ chown -R www-data:nginx ./bw-data/www find ./bw-data/www -type f -exec chmod 0640 {} \; find ./bw-data/www -type d -exec chmod 0750 {} \; cp -rp ./bw-data/www/* /opt/bunkerweb/www -cp variables.env /opt/bunkerweb/variables.env diff --git a/tests/LinuxTest.py b/tests/LinuxTest.py index 72dd34d4..16b6da1e 100644 --- a/tests/LinuxTest.py +++ b/tests/LinuxTest.py @@ -118,6 +118,17 @@ class LinuxTest(Test) : return False return True + def _cleanup_test(self) : + try : + proc = LinuxTest.docker_exec(self.__distro, "rm -rf /opt/bunkerweb/www/* ; rm -rf /opt/bunkerweb/confs/* ; rm -rf /opt/bunkerweb/plugins/*") + if proc.returncode != 0 : + raise(Exception("docker exec rm failed (cleanup)")) + super()._cleanup_test() + except : + log("DOCKER", "❌", "exception while running DockerTest._cleanup_test()\n" + format_exc()) + return False + return True + def _debug_fail(self) : LinuxTest.docker_exec(self.__distro, "cat /var/log/nginx/access.log ; cat /var/log/nginx/error.log ; journalctl -u bunkerweb --no-pager")