Moved users creation in core

master
Ionut Filip 6 years ago
parent c3bc7988c9
commit 88f5e6e4cf

@ -18,10 +18,6 @@ install:
before_script:
- docker-compose -v
- docker-compose -f tests/build.yml build
- docker-compose up -d admin
- docker-compose exec admin python manage.py admin admin mailu.io password
- docker-compose exec admin python manage.py user --hash_scheme='SHA512-CRYPT' user mailu.io 'password'
- docker-compose down
script:
# test.py, test name and timeout between start and tests.

@ -0,0 +1,3 @@
echo "Creating users ..."
docker-compose -f tests/compose/core/docker-compose.yml exec admin python manage.py admin admin mailu.io password || exit 1
docker-compose -f tests/compose/core/docker-compose.yml exec admin python manage.py user --hash_scheme='SHA512-CRYPT' user mailu.io 'password' || exit 1

@ -69,13 +69,14 @@ def print_logs():
#Iterating over hooks in test folder and running them
def hooks():
print("Running hooks")
os.system("python3 tests/compose/email_test.py")
for test_file in sorted(os.listdir(test_path)):
if test_file.endswith(".py"):
os.system("python3 " + test_path + test_file)
elif test_file.endswith(".sh"):
os.system("./" + test_path + test_file)
os.system("python3 tests/compose/email_test.py")
# Start up containers
os.system("mkdir -p /mailu && cp -r tests/certs /mailu")
os.system("chmod 600 /mailu/certs/* ")

Loading…
Cancel
Save