diff --git a/.travis.yml b/.travis.yml index 18e18efb..032db3bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,3 @@ -language: python -python: - - "2.7" env: - DOCKER_COMPOSE_VERSION: 1.23.1 @@ -19,14 +16,11 @@ before_install: install: - chmod ugo+x ./dbench + - chmod ugo+x ./test.sh - ./dbench setup docker - ./dbench init frappe-bench - ./dbench new-site site1.local - ./dbench setup hosts - - pip install --upgrade virtualenv - - virtualenv -p python3 testenv - - source testenv/bin/activate - - pip install requests script: - docker-compose ps | grep -i frappe @@ -34,5 +28,5 @@ script: - docker-compose ps | grep -i redis-queue - docker-compose ps | grep -i redis-socketio - docker-compose ps | grep -i mariadb - - python test.py - - docker-compose stop + - ./test.sh + - ./dbench setup docker stop diff --git a/test.py b/test.py deleted file mode 100644 index c127ad74..00000000 --- a/test.py +++ /dev/null @@ -1,29 +0,0 @@ -import subprocess, requests, datetime, _thread, time, os, signal -start_time = datetime.datetime.now().time() -bench_start = 'docker exec -i frappe bash -c "bench start"' -process = subprocess.Popen(bench_start, stdout=subprocess.PIPE , shell=True) - - -def print_out(val,delay): - while 1: - time.sleep(delay) - if val == 1: - result,error = process.communicate() - print(result) - elif val == 2: - try: - global r - r = requests.get("http://localhost:8000") - print(r) - except requests.exceptions.ConnectionError as e: - print(e) - -_thread.start_new_thread(print_out, (1, 1)) -#result, error = process.communicate() -_thread.start_new_thread(print_out, (2, 1)) - -time.sleep(30) - -process.kill() - -assert '