From 013600edc08d5577445a9943ec145f0b016e53d3 Mon Sep 17 00:00:00 2001 From: Tim Head Date: Sun, 6 Mar 2016 08:40:40 +0100 Subject: [PATCH 01/13] Starting the travis setup --- .travis.yml | 21 +++++++++++++++++++++ build_tools/travis/install.sh | 15 +++++++++++++++ requirements.txt | 3 +-- 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 .travis.yml create mode 100755 build_tools/travis/install.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5dda19e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,21 @@ +language: python +sudo: false +python: + - 3.5 + - 3.4 +env: + - JHUB_VERSION=master + - JHUB_VERSION=latest # latest released version + +before_install: + - npm install + - npm install -g configurable-http-proxy + - git clone --quiet --depth 1 https://github.com/minrk/travis-wheels travis-wheels +install: ./build_tools/travis/install.sh + +script: + - nose2 -v + +# Make travis quiet +notifications: + email: false diff --git a/build_tools/travis/install.sh b/build_tools/travis/install.sh new file mode 100755 index 0000000..cabc5a8 --- /dev/null +++ b/build_tools/travis/install.sh @@ -0,0 +1,15 @@ +#! /usr/bin/env bash + +if [[ "$JHUB_VERSION" == "master" ]]; then + echo "Using jupyterhub master" + pushd /tmp + git clone --quiet --depth 1 https://github.com/jupyter/jupyterhub.git + cd jupyterhub + pip install -r requirements.txt -e. + python setup.py js + python3 setup.py css + popd + echo "Done installing jupyterhub master" +fi + +pip install -f travis-wheels/wheelhouse -r requirements.txt . diff --git a/requirements.txt b/requirements.txt index f3faa05..12b2117 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,6 @@ ipython[notebook] coveralls -pytest-cov -pytest +nose2 jupyterhub dockerspawner GitPython==1.0.1 From ca86cceb1098f7d4beafb64eee0876483359c032 Mon Sep 17 00:00:00 2001 From: Tim Head Date: Sun, 6 Mar 2016 10:17:06 +0100 Subject: [PATCH 02/13] Typo --- build_tools/travis/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/travis/install.sh b/build_tools/travis/install.sh index cabc5a8..4d43f91 100755 --- a/build_tools/travis/install.sh +++ b/build_tools/travis/install.sh @@ -7,7 +7,7 @@ if [[ "$JHUB_VERSION" == "master" ]]; then cd jupyterhub pip install -r requirements.txt -e. python setup.py js - python3 setup.py css + python setup.py css popd echo "Done installing jupyterhub master" fi From 9a4d4805619b4ea2cb2fc6615ad6fe949e3249f9 Mon Sep 17 00:00:00 2001 From: Tim Head Date: Sun, 6 Mar 2016 11:27:38 +0100 Subject: [PATCH 03/13] Integrating frontend testing --- .travis.yml | 3 +- base_config.py | 34 +++++++ build_tools/travis/frontend_test_config.py | 4 + build_tools/travis/test_frontend.sh | 11 +++ frontend_tests/test_happy_mp.py | 141 +++++++++++++++++++++++++++++ local_dockermachine_config.py | 21 +++++ 6 files changed, 213 insertions(+), 1 deletion(-) create mode 100644 base_config.py create mode 100644 build_tools/travis/frontend_test_config.py create mode 100644 build_tools/travis/test_frontend.sh create mode 100644 frontend_tests/test_happy_mp.py create mode 100644 local_dockermachine_config.py diff --git a/.travis.yml b/.travis.yml index 5dda19e..df945db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,8 @@ before_install: install: ./build_tools/travis/install.sh script: - - nose2 -v + - nose2 -v --start-dir everware # unit tests live in everware/ + - ./build_tools/travis/test_frontend.sh # Make travis quiet notifications: diff --git a/base_config.py b/base_config.py new file mode 100644 index 0000000..ae25a20 --- /dev/null +++ b/base_config.py @@ -0,0 +1,34 @@ +import os +import everware +import jupyterhub.handlers.pages +import jupyterhub.handlers.base + + +# TODO: find a way to change default handlers +# instead of this shit +jupyterhub.handlers.base.UserSpawnHandler.get = everware.UserSpawnHandler.get +jupyterhub.handlers.pages.SpawnHandler.post = everware.SpawnHandler.post +jupyterhub.handlers.pages.SpawnHandler.get = everware.SpawnHandler.get +jupyterhub.handlers.pages.SpawnHandler._spawn = everware.SpawnHandler._spawn +jupyterhub.handlers.pages.HomeHandler.get = everware.HomeHandler.get + +c = get_config() + +# spawn with custom docker containers +c.JupyterHub.spawner_class = 'everware.CustomDockerSpawner' + +c.Spawner.tls = False +c.Spawner.debug = True +c.Spawner.start_timeout = 1000 +c.Spawner.remove_containers = True +c.Spawner.tls_assert_hostname = False +c.Spawner.use_docker_client_env = True + +# The docker containers need access to the Hub, so the default loopback +# port doesn't work: +from jupyter_client.localinterfaces import public_ips +c.JupyterHub.hub_ip = public_ips()[0] +c.JupyterHub.hub_api_ip = public_ips()[0] + +c.JupyterHub.data_files_path = 'share' +c.JupyterHub.template_paths = ['share/static/html'] diff --git a/build_tools/travis/frontend_test_config.py b/build_tools/travis/frontend_test_config.py new file mode 100644 index 0000000..fce645e --- /dev/null +++ b/build_tools/travis/frontend_test_config.py @@ -0,0 +1,4 @@ +c = get_config() +load_subconfig('base_config.py') + +c.JupyterHub.authenticator_class = 'dummyauthenticator.DummyAuthenticator' diff --git a/build_tools/travis/test_frontend.sh b/build_tools/travis/test_frontend.sh new file mode 100644 index 0000000..68b9379 --- /dev/null +++ b/build_tools/travis/test_frontend.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# This script is meant to be run from the script step in .travis.yml +# The tests run by this script are "frontend" testing + +set -e + +# Start a hub that our tests can interact with +jupyterhub -f build_tools/travis/frontend_test_config.py --no-ssl --debug +sleep 3 +nose2 -v --start-dir frontend_tests -N 2 test_happy_mp diff --git a/frontend_tests/test_happy_mp.py b/frontend_tests/test_happy_mp.py new file mode 100644 index 0000000..b75bf98 --- /dev/null +++ b/frontend_tests/test_happy_mp.py @@ -0,0 +1,141 @@ +# -*- coding: utf-8 -*- +from selenium import webdriver +from selenium.webdriver.common.by import By +from selenium.webdriver.common.keys import Keys +from selenium.webdriver.support.ui import Select +from selenium.common.exceptions import NoSuchElementException +from selenium.common.exceptions import NoAlertPresentException +import time +import traceback +import nose2 + + +REPO = "https://github.com/everware/everware-dimuon-example" +# repo = "docker:yandex/rep-tutorial:0.1.3" +# repo = "docker:everware/https_github_com_everware_everware_dimuon_example-5e87f9567d33842e12636038d56544d54c3d0702" +# repo = "docker:everware/https_github_com_everware_everware_dimuon_example-9bec6770485eb6b245648bc251d045a204973cc9" +# REPO = "docker:yandex/rep-tutorial" + +DRIVER = "phantomjs" +# DRIVER = "firefox" + +# Test matrix +SCENARIOUS = ["scenario_short", "scenario_full"] +# SCENARIOUS = ["scenario_full"] +USERS = ["an1", "an2"] + +class User: + def __init__(self, login=None, repo=REPO, driver_type=DRIVER): + self.login = login + self.repo = repo + self.password = "" + self.log("init") + + self.driver_type = driver_type + self.base_url = "http://localhost:8000/" + self.verificationErrors = [] + self.accept_next_alert = True + + + def get_driver(self): + if self.driver_type == "phantomjs": + self.driver = webdriver.PhantomJS('/usr/local/bin/phantomjs') + if self.driver_type == "firefox": + self.driver = webdriver.Firefox() + self.driver.implicitly_wait(60) + return self.driver + + + def tearDown(self): + self.driver.quit() + # return self.verificationErrors + + def log(self, message): + print("{}: {}".format(self.login, message)) + + + def wait_for_element_present(self, how, what, displayed=True, timeout=30): + for i in range(timeout): + element = self.driver.find_element(by=how, value=what) + if element is not None and element.is_displayed() == displayed: break + time.sleep(1) + else: assert False, "time out waiting for (%s, %s)" % (how, what) + + + def wait_for_element_id_is_gone(self, value, timeout=30): + for i in range(timeout): + try: + element = self.driver.find_element_by_id(value) + except NoSuchElementException as e: + break + time.sleep(1) + # self.log("waiting for %s to go %d" % (value, i)) + else: self.fail("time out wairing for (%s) to disappear" % (what)) + self.log("gone finally (%d)" % i) + + + def is_element_present(self, how, what): + try: self.driver.find_element(by=how, value=what) + except NoSuchElementException as e: return False + return True + + +def test_generator(): + for scenario in SCENARIOUS: + for username in USERS: + yield scenario_runner, scenario, username + + +def scenario_runner(scenario, username): + user = User(username) + try: + globals()[scenario](user) + except Exception as e: + print("oops: %s" % repr(e)) + assert False, traceback.format_stack() + finally: + user.tearDown() + + +def scenario_short(user): + driver = user.get_driver() + driver.get(user.base_url + "/hub/login") + user.log("login") + driver.find_element_by_id("username_input").clear() + driver.find_element_by_id("username_input").send_keys(user.login) + driver.find_element_by_id("password_input").clear() + driver.find_element_by_id("password_input").send_keys(user.password) + driver.find_element_by_id("login_submit").click() + user.wait_for_element_present(By.ID, "start") + driver.find_element_by_id("logout").click() + user.log("logout clicked") + + +def scenario_full(user): + driver = user.get_driver() + driver.get(user.base_url + "/hub/login") + user.log("login") + driver.find_element_by_id("username_input").clear() + driver.find_element_by_id("username_input").send_keys(user.login) + driver.find_element_by_id("password_input").clear() + driver.find_element_by_id("password_input").send_keys(user.password) + driver.find_element_by_id("login_submit").click() + user.wait_for_element_present(By.ID, "start") + driver.find_element_by_id("start").click() + driver.find_element_by_id("repository_input").clear() + driver.find_element_by_id("repository_input").send_keys(user.repo) + driver.find_element_by_xpath("//input[@value='Spawn']").click() + user.log("start clicked") + user.wait_for_element_present(By.LINK_TEXT, "Control Panel") + driver.find_element_by_link_text("Control Panel").click() + user.wait_for_element_present(By.ID, "stop") + driver.find_element_by_id("stop").click() + user.log("stop clicked") + user.wait_for_element_present(By.ID, "wait") + user.log("waiting to stop") + user.wait_for_element_id_is_gone("wait") + driver.find_element_by_id("logout").click() + user.log("logout clicked") + +if __name__ == "__main__": + nose2.main() diff --git a/local_dockermachine_config.py b/local_dockermachine_config.py new file mode 100644 index 0000000..ba7e4e3 --- /dev/null +++ b/local_dockermachine_config.py @@ -0,0 +1,21 @@ +import os +import everware + + +c = get_config() +load_subconfig('base_config.py') + +authenticator = everware.GitHubOAuthenticator +c.JupyterHub.authenticator_class = 'everware.GitHubOAuthenticator' +whitelist_file = 'whitelist.txt' +whitelist_handler = everware.DefaultWhitelistHandler(whitelist_file, + c, + authenticator) +c.GitHubOAuthenticator.oauth_callback_url = os.environ['OAUTH_CALLBACK_URL'] +c.GitHubOAuthenticator.client_id = os.environ['GITHUB_CLIENT_ID'] +c.GitHubOAuthenticator.client_secret = os.environ['GITHUB_CLIENT_SECRET'] + +# change this to the ip that `boot2docker ip` or +# `docker-machine ip `tells you if +# you use boot2docker/a VM, otherwise remove the line +c.Spawner.container_ip = '192.168.99.100' From 330e82f275daf4e0b33abbb88c27fcf6b18a79a4 Mon Sep 17 00:00:00 2001 From: Tim Head Date: Sun, 6 Mar 2016 11:39:44 +0100 Subject: [PATCH 04/13] Focussing on infrastructure stuff Removing as much as possible to make this about infrastructure --- build_tools/travis/test_frontend.sh | 6 ++++- frontend_tests/test_happy_mp.py | 53 +++++-------------------------------- 2 files changed, 11 insertions(+), 48 deletions(-) diff --git a/build_tools/travis/test_frontend.sh b/build_tools/travis/test_frontend.sh index 68b9379..1a42a95 100644 --- a/build_tools/travis/test_frontend.sh +++ b/build_tools/travis/test_frontend.sh @@ -6,6 +6,10 @@ set -e # Start a hub that our tests can interact with -jupyterhub -f build_tools/travis/frontend_test_config.py --no-ssl --debug +jupyterhub -f build_tools/travis/frontend_test_config.py \ + --no-ssl --debug > hub.txt 2>&1 & sleep 3 nose2 -v --start-dir frontend_tests -N 2 test_happy_mp +echo ">>> Logging output of jupyterhub" +cat hub.log +echo "<<< Logging output of jupyterhub" diff --git a/frontend_tests/test_happy_mp.py b/frontend_tests/test_happy_mp.py index b75bf98..55c5b2e 100644 --- a/frontend_tests/test_happy_mp.py +++ b/frontend_tests/test_happy_mp.py @@ -10,22 +10,15 @@ import nose2 -REPO = "https://github.com/everware/everware-dimuon-example" -# repo = "docker:yandex/rep-tutorial:0.1.3" -# repo = "docker:everware/https_github_com_everware_everware_dimuon_example-5e87f9567d33842e12636038d56544d54c3d0702" -# repo = "docker:everware/https_github_com_everware_everware_dimuon_example-9bec6770485eb6b245648bc251d045a204973cc9" -# REPO = "docker:yandex/rep-tutorial" - -DRIVER = "phantomjs" -# DRIVER = "firefox" - # Test matrix -SCENARIOUS = ["scenario_short", "scenario_full"] -# SCENARIOUS = ["scenario_full"] +SCENARIOS = ["scenario_short"] + USERS = ["an1", "an2"] class User: - def __init__(self, login=None, repo=REPO, driver_type=DRIVER): + def __init__(self, login=None, + repo="https://github.com/everware/everware-dimuon-example", + driver_type="phantomjs"): self.login = login self.repo = repo self.password = "" @@ -36,7 +29,6 @@ def __init__(self, login=None, repo=REPO, driver_type=DRIVER): self.verificationErrors = [] self.accept_next_alert = True - def get_driver(self): if self.driver_type == "phantomjs": self.driver = webdriver.PhantomJS('/usr/local/bin/phantomjs') @@ -45,7 +37,6 @@ def get_driver(self): self.driver.implicitly_wait(60) return self.driver - def tearDown(self): self.driver.quit() # return self.verificationErrors @@ -53,7 +44,6 @@ def tearDown(self): def log(self, message): print("{}: {}".format(self.login, message)) - def wait_for_element_present(self, how, what, displayed=True, timeout=30): for i in range(timeout): element = self.driver.find_element(by=how, value=what) @@ -61,7 +51,6 @@ def wait_for_element_present(self, how, what, displayed=True, timeout=30): time.sleep(1) else: assert False, "time out waiting for (%s, %s)" % (how, what) - def wait_for_element_id_is_gone(self, value, timeout=30): for i in range(timeout): try: @@ -73,7 +62,6 @@ def wait_for_element_id_is_gone(self, value, timeout=30): else: self.fail("time out wairing for (%s) to disappear" % (what)) self.log("gone finally (%d)" % i) - def is_element_present(self, how, what): try: self.driver.find_element(by=how, value=what) except NoSuchElementException as e: return False @@ -81,7 +69,7 @@ def is_element_present(self, how, what): def test_generator(): - for scenario in SCENARIOUS: + for scenario in SCENARIOS: for username in USERS: yield scenario_runner, scenario, username @@ -110,32 +98,3 @@ def scenario_short(user): driver.find_element_by_id("logout").click() user.log("logout clicked") - -def scenario_full(user): - driver = user.get_driver() - driver.get(user.base_url + "/hub/login") - user.log("login") - driver.find_element_by_id("username_input").clear() - driver.find_element_by_id("username_input").send_keys(user.login) - driver.find_element_by_id("password_input").clear() - driver.find_element_by_id("password_input").send_keys(user.password) - driver.find_element_by_id("login_submit").click() - user.wait_for_element_present(By.ID, "start") - driver.find_element_by_id("start").click() - driver.find_element_by_id("repository_input").clear() - driver.find_element_by_id("repository_input").send_keys(user.repo) - driver.find_element_by_xpath("//input[@value='Spawn']").click() - user.log("start clicked") - user.wait_for_element_present(By.LINK_TEXT, "Control Panel") - driver.find_element_by_link_text("Control Panel").click() - user.wait_for_element_present(By.ID, "stop") - driver.find_element_by_id("stop").click() - user.log("stop clicked") - user.wait_for_element_present(By.ID, "wait") - user.log("waiting to stop") - user.wait_for_element_id_is_gone("wait") - driver.find_element_by_id("logout").click() - user.log("logout clicked") - -if __name__ == "__main__": - nose2.main() From 63ab6b3a53733b909d2a4eb6065d63b64c422fd1 Mon Sep 17 00:00:00 2001 From: Tim Head Date: Sun, 6 Mar 2016 11:41:36 +0100 Subject: [PATCH 05/13] Enable docker on travis --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index df945db..f50dfd5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,10 @@ language: python -sudo: false + +# Needed so we can spawn docker containers +sudo: required +services: + - docker + python: - 3.5 - 3.4 From f6eb52eeef4932064661877b8ae536aa419ad372 Mon Sep 17 00:00:00 2001 From: Tim Head Date: Sun, 6 Mar 2016 11:42:35 +0100 Subject: [PATCH 06/13] Executable flag --- build_tools/travis/test_frontend.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 build_tools/travis/test_frontend.sh diff --git a/build_tools/travis/test_frontend.sh b/build_tools/travis/test_frontend.sh old mode 100644 new mode 100755 From e8a7d00b42996cdb8da5fcd27bb75481a65a8a4c Mon Sep 17 00:00:00 2001 From: Tim Head Date: Sun, 6 Mar 2016 11:46:37 +0100 Subject: [PATCH 07/13] Multi processing is not yet understood --- build_tools/travis/test_frontend.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build_tools/travis/test_frontend.sh b/build_tools/travis/test_frontend.sh index 1a42a95..9bb8de4 100755 --- a/build_tools/travis/test_frontend.sh +++ b/build_tools/travis/test_frontend.sh @@ -6,10 +6,14 @@ set -e # Start a hub that our tests can interact with +echo "Starting everware" jupyterhub -f build_tools/travis/frontend_test_config.py \ --no-ssl --debug > hub.txt 2>&1 & sleep 3 -nose2 -v --start-dir frontend_tests -N 2 test_happy_mp + +echo "Start running frontend tests" +nose2 -v --start-dir frontend_tests + echo ">>> Logging output of jupyterhub" cat hub.log echo "<<< Logging output of jupyterhub" From 35efc4594dfb993831a3faa28ab6e67f27acf030 Mon Sep 17 00:00:00 2001 From: Tim Head Date: Sun, 6 Mar 2016 11:53:00 +0100 Subject: [PATCH 08/13] Missing deps --- .travis.yml | 5 +++++ requirements.txt | 1 + 2 files changed, 6 insertions(+) diff --git a/.travis.yml b/.travis.yml index f50dfd5..b5d0e33 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,11 @@ sudo: required services: - docker +addons: + apt: + packages: + - build-essential + python: - 3.5 - 3.4 diff --git a/requirements.txt b/requirements.txt index 12b2117..4a7dbce 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ ipython[notebook] coveralls nose2 +selenium jupyterhub dockerspawner GitPython==1.0.1 From c47bda4aa7ab51f09e3041463c45bbdcc710e59b Mon Sep 17 00:00:00 2001 From: Tim Head Date: Sun, 6 Mar 2016 12:00:08 +0100 Subject: [PATCH 09/13] Remove actual testing --- frontend_tests/test_happy_mp.py | 100 ---------------------------------------- 1 file changed, 100 deletions(-) delete mode 100644 frontend_tests/test_happy_mp.py diff --git a/frontend_tests/test_happy_mp.py b/frontend_tests/test_happy_mp.py deleted file mode 100644 index 55c5b2e..0000000 --- a/frontend_tests/test_happy_mp.py +++ /dev/null @@ -1,100 +0,0 @@ -# -*- coding: utf-8 -*- -from selenium import webdriver -from selenium.webdriver.common.by import By -from selenium.webdriver.common.keys import Keys -from selenium.webdriver.support.ui import Select -from selenium.common.exceptions import NoSuchElementException -from selenium.common.exceptions import NoAlertPresentException -import time -import traceback -import nose2 - - -# Test matrix -SCENARIOS = ["scenario_short"] - -USERS = ["an1", "an2"] - -class User: - def __init__(self, login=None, - repo="https://github.com/everware/everware-dimuon-example", - driver_type="phantomjs"): - self.login = login - self.repo = repo - self.password = "" - self.log("init") - - self.driver_type = driver_type - self.base_url = "http://localhost:8000/" - self.verificationErrors = [] - self.accept_next_alert = True - - def get_driver(self): - if self.driver_type == "phantomjs": - self.driver = webdriver.PhantomJS('/usr/local/bin/phantomjs') - if self.driver_type == "firefox": - self.driver = webdriver.Firefox() - self.driver.implicitly_wait(60) - return self.driver - - def tearDown(self): - self.driver.quit() - # return self.verificationErrors - - def log(self, message): - print("{}: {}".format(self.login, message)) - - def wait_for_element_present(self, how, what, displayed=True, timeout=30): - for i in range(timeout): - element = self.driver.find_element(by=how, value=what) - if element is not None and element.is_displayed() == displayed: break - time.sleep(1) - else: assert False, "time out waiting for (%s, %s)" % (how, what) - - def wait_for_element_id_is_gone(self, value, timeout=30): - for i in range(timeout): - try: - element = self.driver.find_element_by_id(value) - except NoSuchElementException as e: - break - time.sleep(1) - # self.log("waiting for %s to go %d" % (value, i)) - else: self.fail("time out wairing for (%s) to disappear" % (what)) - self.log("gone finally (%d)" % i) - - def is_element_present(self, how, what): - try: self.driver.find_element(by=how, value=what) - except NoSuchElementException as e: return False - return True - - -def test_generator(): - for scenario in SCENARIOS: - for username in USERS: - yield scenario_runner, scenario, username - - -def scenario_runner(scenario, username): - user = User(username) - try: - globals()[scenario](user) - except Exception as e: - print("oops: %s" % repr(e)) - assert False, traceback.format_stack() - finally: - user.tearDown() - - -def scenario_short(user): - driver = user.get_driver() - driver.get(user.base_url + "/hub/login") - user.log("login") - driver.find_element_by_id("username_input").clear() - driver.find_element_by_id("username_input").send_keys(user.login) - driver.find_element_by_id("password_input").clear() - driver.find_element_by_id("password_input").send_keys(user.password) - driver.find_element_by_id("login_submit").click() - user.wait_for_element_present(By.ID, "start") - driver.find_element_by_id("logout").click() - user.log("logout clicked") - From 670df61873a1e71a538f82a0681361f15278cb8a Mon Sep 17 00:00:00 2001 From: Tim Head Date: Sun, 6 Mar 2016 12:04:45 +0100 Subject: [PATCH 10/13] Empty directories are not a git thing --- frontend_tests/.empty | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 frontend_tests/.empty diff --git a/frontend_tests/.empty b/frontend_tests/.empty new file mode 100644 index 0000000..e69de29 From 2026809bdb59a32e29415d8d4ab9877e92a5983f Mon Sep 17 00:00:00 2001 From: Tim Head Date: Sun, 6 Mar 2016 12:09:17 +0100 Subject: [PATCH 11/13] Find the log --- build_tools/travis/test_frontend.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build_tools/travis/test_frontend.sh b/build_tools/travis/test_frontend.sh index 9bb8de4..eb8583d 100755 --- a/build_tools/travis/test_frontend.sh +++ b/build_tools/travis/test_frontend.sh @@ -4,16 +4,17 @@ # The tests run by this script are "frontend" testing set -e +echo "In" `pwd` # Start a hub that our tests can interact with echo "Starting everware" jupyterhub -f build_tools/travis/frontend_test_config.py \ - --no-ssl --debug > hub.txt 2>&1 & + --no-ssl --debug > /tmp/hub.txt 2>&1 & sleep 3 echo "Start running frontend tests" nose2 -v --start-dir frontend_tests echo ">>> Logging output of jupyterhub" -cat hub.log +cat /tmp/hub.log echo "<<< Logging output of jupyterhub" From 84a368f80b42e52888ce88a4035a9835d08044d1 Mon Sep 17 00:00:00 2001 From: Tim Head Date: Sun, 6 Mar 2016 12:17:28 +0100 Subject: [PATCH 12/13] We don't need logs --- build_tools/travis/test_frontend.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/build_tools/travis/test_frontend.sh b/build_tools/travis/test_frontend.sh index eb8583d..13be3ad 100755 --- a/build_tools/travis/test_frontend.sh +++ b/build_tools/travis/test_frontend.sh @@ -9,12 +9,8 @@ echo "In" `pwd` # Start a hub that our tests can interact with echo "Starting everware" jupyterhub -f build_tools/travis/frontend_test_config.py \ - --no-ssl --debug > /tmp/hub.txt 2>&1 & + --no-ssl --debug & sleep 3 echo "Start running frontend tests" nose2 -v --start-dir frontend_tests - -echo ">>> Logging output of jupyterhub" -cat /tmp/hub.log -echo "<<< Logging output of jupyterhub" From 9dfef96d8a3f3eb027957ffb2934249716ef96fb Mon Sep 17 00:00:00 2001 From: Tim Head Date: Sun, 6 Mar 2016 12:22:21 +0100 Subject: [PATCH 13/13] Missing dependency --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 4a7dbce..c52a3ef 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,7 @@ ipython[notebook] coveralls nose2 selenium +jupyterhub-dummyauthenticator jupyterhub dockerspawner GitPython==1.0.1