2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-08 22:31:07 +00:00

changes to test and travis.yml

Former-commit-id: 39828590e7
This commit is contained in:
vishalseshagiri 2017-08-03 15:05:55 +05:30
parent 67477a1adc
commit 94ecd0f69e
2 changed files with 7 additions and 7 deletions

View File

@ -27,3 +27,4 @@ script:
- docker-compose ps | grep -i redis-socketio - docker-compose ps | grep -i redis-socketio
- docker-compose ps | grep -i mariadb - docker-compose ps | grep -i mariadb
- python3 test.py - python3 test.py
- docker-compose stop

13
test.py
View File

@ -1,9 +1,9 @@
import subprocess, requests, datetime, _thread, time, os, signal import subprocess, requests, datetime, _thread, time, os, signal
start_time = datetime.datetime.now().time() start_time = datetime.datetime.now().time()
r = None
e = None
bench_start = 'docker exec -i frappe bash -c "bench start"' bench_start = 'docker exec -i frappe bash -c "bench start"'
process = subprocess.Popen(bench_start, shell=True) process = subprocess.Popen(bench_start, stdout=subprocess.PIPE , shell=True)
r = None
def print_out(val,delay): def print_out(val,delay):
while 1: while 1:
@ -24,8 +24,7 @@ _thread.start_new_thread(print_out, (2, 1))
time.sleep(45) time.sleep(45)
os.killpg(os.getpgid(process.pid), signal.SIGTERM) # Kill bench start process.kill()
print(r.content) assert '<title> Login </title>' in str(r.content)
#os.killpg(os.getpgid(process.pid), signal.SIGTERM) # Kill bench start
assert '<title> Login </title>' in r.content, "Login page failed to load"