mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-11-09 23:00:56 +00:00
changes to test and travis.yml
This commit is contained in:
parent
81cdd24cb6
commit
39828590e7
@ -27,3 +27,4 @@ script:
|
||||
- docker-compose ps | grep -i redis-socketio
|
||||
- docker-compose ps | grep -i mariadb
|
||||
- python3 test.py
|
||||
- docker-compose stop
|
||||
|
13
test.py
13
test.py
@ -1,9 +1,9 @@
|
||||
import subprocess, requests, datetime, _thread, time, os, signal
|
||||
start_time = datetime.datetime.now().time()
|
||||
r = None
|
||||
e = None
|
||||
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):
|
||||
while 1:
|
||||
@ -24,8 +24,7 @@ _thread.start_new_thread(print_out, (2, 1))
|
||||
|
||||
time.sleep(45)
|
||||
|
||||
os.killpg(os.getpgid(process.pid), signal.SIGTERM) # Kill bench start
|
||||
process.kill()
|
||||
|
||||
print(r.content)
|
||||
|
||||
assert '<title> Login </title>' in r.content, "Login page failed to load"
|
||||
assert '<title> Login </title>' in str(r.content)
|
||||
#os.killpg(os.getpgid(process.pid), signal.SIGTERM) # Kill bench start
|
||||
|
Loading…
Reference in New Issue
Block a user