tests - fix wrong command in linux tests

This commit is contained in:
florian 2023-08-04 17:13:07 +02:00
parent 8f7833413b
commit 843c023707
No known key found for this signature in database
GPG key ID: 3D80806F12602A7C
3 changed files with 4 additions and 4 deletions

View file

@ -120,7 +120,7 @@ try:
)
tgz = get_file_in_db("folder.tgz", db, job_name="certbot-renew")
if tgz and bw_integration in ("Docker", "Swarm", "Kubernetes", "Autoconf"):
if tgz:
# Delete folder if needed
if letsencrypt_path.exists():
rmtree(str(letsencrypt_path), ignore_errors=True)

View file

@ -102,7 +102,7 @@ try:
elif os_release_path.is_file() and "Alpine" in os_release_path.read_text(
encoding="utf-8"
):
bw_integration + "Docker"
bw_integration = "Docker"
# Extract letsencrypt folder if it exists in db
db = Database(
@ -112,7 +112,7 @@ try:
)
tgz = get_file_in_db("folder.tgz", db)
if tgz and bw_integration in ("Docker", "Swarm", "Kubernetes", "Autoconf"):
if tgz:
# Delete folder if needed
if letsencrypt_path.exists():
rmtree(str(letsencrypt_path), ignore_errors=True)

View file

@ -112,7 +112,7 @@ class LinuxTest(Test):
setup = f"{test}/setup-linux.sh"
if isfile(setup):
proc = self.docker_exec(
self.__distro, f"cd /opt/{self._name} && ./setup-linux.sh && chmod -R nginx:nginx /etc/bunkerweb/configs"
self.__distro, f"cd /opt/{self._name} && ./setup-linux.sh && chown -R nginx:nginx /etc/bunkerweb/configs"
)
if proc.returncode != 0:
raise Exception("docker exec setup failed (test)")