You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-06-25 00:37:21 +02:00
Implemented email test for travis
This commit is contained in:
@ -17,7 +17,7 @@ containers = []
|
||||
# Stop containers
|
||||
def stop(exit_code):
|
||||
print_logs()
|
||||
os.system("docker-compose -f " + compose_file + " -p ${DOCKER_ORG:-mailu} down")
|
||||
os.system("docker-compose -f " + compose_file + " down")
|
||||
sys.exit(exit_code)
|
||||
|
||||
# Sleep for a defined amount of time
|
||||
@ -69,25 +69,17 @@ 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)
|
||||
|
||||
#Create admin and user
|
||||
def create_users():
|
||||
print("Creating admin account...")
|
||||
os.system("docker-compose -p $DOCKER_ORG exec admin python manage.py admin admin mailu.io password")
|
||||
print("Admin account created")
|
||||
print("Creating user account...")
|
||||
os.system("docker-compose -p $DOCKER_ORG exec admin python manage.py user --hash_scheme='SHA512-CRYPT' user mailu.io 'password'")
|
||||
print("User account created")
|
||||
|
||||
# Start up containers
|
||||
os.system("mkdir -p /mailu && cp -r tests/certs /mailu")
|
||||
os.system("chmod 600 /mailu/certs/* ")
|
||||
os.system("docker-compose -f " + compose_file + " -p ${DOCKER_ORG:-mailu} up -d ")
|
||||
os.system("docker-compose -f " + compose_file + " up -d ")
|
||||
print()
|
||||
sleep()
|
||||
print()
|
||||
@ -95,7 +87,6 @@ os.system("docker ps -a")
|
||||
print()
|
||||
health_checks()
|
||||
print()
|
||||
create_users()
|
||||
hooks()
|
||||
print()
|
||||
stop(0)
|
||||
|
Reference in New Issue
Block a user