tests - fix linux/drupal (again)

This commit is contained in:
bunkerity 2022-08-17 16:43:34 +02:00
parent 4caae414d5
commit e847343143
No known key found for this signature in database
GPG Key ID: 3D80806F12602A7C
2 changed files with 6 additions and 4 deletions

View File

@ -15,9 +15,11 @@ else
fi
curl https://www.drupal.org/download-latest/tar.gz -Lo /tmp/drupal.tar.gz
tar -xzf /tmp/drupal.tar.gz -C /tmp
current_dir="$(pwd)"
cd /tmp/drupal-*
cp -r * /opt/bunkerweb/www
chown -R $user:nginx /opt/bunkerweb/www
find /opt/bunkerweb/www -type f -exec chmod 0640 {} \;
find /opt/bunkerweb/www -type d -exec chmod 0750 {} \;
cp -r bw-data/configs/* /opt/bunkerweb/configs
cd "$current_dir"
cp -r ./bw-data/configs/* /opt/bunkerweb/configs

View File

@ -98,11 +98,11 @@ class LinuxTest(Test) :
Test.replace_in_files(test, ex_domain, test_domain)
Test.rename(test, ex_domain, test_domain)
Test.replace_in_files(test, "example.com", getenv("ROOT_DOMAIN"))
proc = LinuxTest.docker_cp(self.__distro, test, "/opt/" + self._name)
if proc.returncode != 0 :
raise(Exception("docker cp failed (test)"))
setup = test + "/setup-linux.sh"
if isfile(setup) :
proc = LinuxTest.docker_cp(self.__distro, test, "/opt/" + self._name)
if proc.returncode != 0 :
raise(Exception("docker cp failed (test)"))
proc = LinuxTest.docker_exec(self.__distro, "cd /opt/" + self._name + " && ./setup-linux.sh")
if proc.returncode != 0 :
raise(Exception("docker exec setup failed (test)"))