tests - copy variables.env for Linux tests

This commit is contained in:
bunkerity 2022-08-08 13:57:00 +02:00
parent 55525abf15
commit 3762c38741
No known key found for this signature in database
GPG Key ID: 3D80806F12602A7C
8 changed files with 13 additions and 24 deletions

View File

@ -380,8 +380,8 @@ jobs:
# run: ./tests/main.py "autoconf"
# - name: Run Swarm tests
# run: ./tests/main.py "swarm"
- name: Run Kubernetes tests
run: ./tests/main.py "kubernetes"
# - name: Run Kubernetes tests
# run: ./tests/main.py "kubernetes"
- name: Generate Linux packages and build test images
run: ./tests/linux.sh ${{ env.BUILD_MODE }}
- name: Run Linux Ubuntu tests

View File

@ -16,5 +16,4 @@ sed -i "s@redis:@@g" /etc/authelia/configuration.yml
sed -i "s@host: redis@@g" /etc/authelia/configuration.yml
sed -i "s@port: 6379@@g" /etc/authelia/configuration.yml
systemctl daemon-reload
systemctl start authelia
cp variables.env /opt/bunkerweb/variables.env
systemctl start authelia

View File

@ -2,8 +2,7 @@
"name": "cors",
"kinds": [
"docker",
"autoconf",
"linux"
"autoconf"
],
"timeout": 60,
"tests": [

View File

@ -4,8 +4,7 @@
"docker",
"autoconf",
"swarm",
"kubernetes",
"linux"
"kubernetes"
],
"no_copy_container": true,
"timeout": 60,

View File

@ -4,8 +4,7 @@
"docker",
"autoconf",
"swarm",
"kubernetes",
"linux"
"kubernetes"
],
"timeout": 60,
"delay": 30,

View File

@ -4,8 +4,7 @@
"docker",
"autoconf",
"swarm",
"kubernetes",
"linux"
"kubernetes"
],
"no_copy_container": true,
"timeout": 60,

View File

@ -4,8 +4,7 @@
"docker",
"autoconf",
"swarm",
"kubernetes",
"linux"
"kubernetes"
],
"timeout": 60,
"delay": 60,

View File

@ -90,10 +90,13 @@ class LinuxTest(Test) :
if isfile(setup) :
proc = LinuxTest.docker_cp(self.__distro, test, "/opt/" + self._name)
if proc.returncode != 0 :
raise(Exception("docker cp failed (linux stack)"))
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 (linux stack)"))
raise(Exception("docker exec setup failed (test)"))
proc = LinuxTest.docker_exec(self.__distro, "cp /opt/" + self._name + "/variables.env /opt/bunkerweb") :
if proc.returncode != 0 :
raise(Exception("docker exec cp variables.env failed (test)"))
proc = LinuxTest.docker_exec(self.__distro, "systemctl restart bunkerweb")
if proc.returncode != 0 :
raise(Exception("docker exec systemctl restart failed (linux stack)"))
@ -103,14 +106,6 @@ class LinuxTest(Test) :
return False
return True
# def _cleanup_test(self) :
# try :
# super()._cleanup_test()
# except :
# log("AUTOCONF", "❌", "exception while running AutoconfTest._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")