From a46d0fe581e2a120fd576b0bced126ca6d60bc73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20M=C3=B6hlmann?= Date: Thu, 25 Oct 2018 18:45:24 +0300 Subject: [PATCH] Fix path for hooks --- tests/compose/test.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/compose/test.py b/tests/compose/test.py index dfe07ea8..819c7222 100755 --- a/tests/compose/test.py +++ b/tests/compose/test.py @@ -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 ")