mirror of
https://github.com/Mailu/Mailu.git
synced 2025-03-17 20:57:54 +02:00
Fix path for hooks
This commit is contained in:
parent
35e0fa1b9d
commit
a46d0fe581
@ -7,7 +7,8 @@ from colorama import Fore, Style
|
||||
# Declare variables for service name and sleep time
|
||||
test_name=sys.argv[1]
|
||||
timeout=int(sys.argv[2])
|
||||
compose_file="tests/compose/" + test_name + "/docker-compose.yml"
|
||||
test_path="tests/compose/" + test_name + "/"
|
||||
compose_file=test_path + "docker-compose.yml"
|
||||
|
||||
client = docker.APIClient(base_url='unix://var/run/docker.sock')
|
||||
|
||||
@ -68,11 +69,11 @@ def print_logs():
|
||||
#Iterating over hooks in test folder and running them
|
||||
def hooks():
|
||||
print("Running hooks")
|
||||
for test_file in sorted(os.listdir(test_name + "/")):
|
||||
for test_file in sorted(os.listdir(test_path)):
|
||||
if test_file.endswith(".py"):
|
||||
os.system("python3 " + test_name + "/" + test_file)
|
||||
os.system("python3 " + test_path + test_file)
|
||||
elif test_file.endswith(".sh"):
|
||||
os.system("./" + test_name + "/" + test_file)
|
||||
os.system("./" + test_path + test_file)
|
||||
|
||||
# Start up containers
|
||||
os.system("docker-compose -f " + compose_file + " -p ${DOCKER_ORG:-mailu} up -d ")
|
||||
|
Loading…
x
Reference in New Issue
Block a user