Exemplo n.º 1
0
def scenario_no_dockerfile(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user, 'https://github.com/everware/runnable_examples')
    user.log("spawn clicked")
    user.wait_for_element_present(By.ID, "resist")
    user.log("correct, no dockerfile")
Exemplo n.º 2
0
def scenario_r_shiny(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user,
                           "https://github.com/everware/r-shiny-example")
    user.log("spawn clicked")
    user.wait_for_pattern_in_page("Iris\s+k-means\s+clustering")
Exemplo n.º 3
0
def scenario_no_dockerfile(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user,
                           'https://github.com/everware/runnable_examples')
    user.log("spawn clicked")
    user.wait_for_element_present(By.ID, "resist")
    user.log("correct, no dockerfile")
Exemplo n.º 4
0
def scenario_jupyter_only(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user,
                           "https://github.com/astiunov/qutip-lectures")
    user.log("spawn clicked")
    user.wait_for_element_present(By.LINK_TEXT, "Control Panel")
    driver.find_element_by_link_text("Control Panel").click()
Exemplo n.º 5
0
def scenario_timeout(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user,
                           'https://github.com/everware/test_long_creation')
    user.log("spawn clicked")
    user.wait_for_element_present(By.ID, "resist")
    user.log('correct, timeout happened')
    driver.find_element_by_id("resist").click()
    user.log("resist clicked")
Exemplo n.º 6
0
def scenario_no_dockerfile(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user, 'https://github.com/everware/runnable_examples')
    user.log("spawn clicked")
    user.wait_for_element_present(By.ID, "resist")
    text = ("Something went wrong during building."
            " Error: Your repo doesn't include Dockerfile")
    assert text in driver.page_source
    user.log("correct, no dockerfile")
Exemplo n.º 7
0
def scenario_no_dockerfile(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user,
                           'https://github.com/everware/runnable_examples')
    user.log("spawn clicked")
    user.wait_for_element_present(By.ID, "resist")
    text = ("Something went wrong during building."
            " Error: Your repo doesn't include Dockerfile")
    assert text in driver.page_source
    user.log("correct, no dockerfile")
Exemplo n.º 8
0
def scenario_timeout(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user, 'https://github.com/everware/test_long_creation')
    user.log("spawn clicked")
    user.wait_for_element_present(By.ID, "resist")
    user.log('correct, timeout happened')
    driver.find_element_by_id("resist").click()
    user.log("resist clicked")
    commons.fill_repo_info(driver, user, 'https://github.com/everware/test_long_creation')
    user.log("spawn clicked (second try)")
    user.wait_for_element_present(By.ID, "resist")
Exemplo n.º 9
0
def scenario_full(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user, user.repo)
    user.log("spawn 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_pattern_in_page(r"Launch\s+a\s+notebook")
    driver.find_element_by_id("logout").click()
    user.log("logout clicked")
Exemplo n.º 10
0
def scenario_default_dockerfile(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user, 'https://github.com/everware/runnable_examples')
    user.log("spawn 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_pattern_in_page(r"Launch\s+a\s+notebook")
    driver.find_element_by_id("logout").click()
    user.log("logout clicked")
Exemplo n.º 11
0
def scenario_full(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user, user.repo)
    user.log("spawn 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_pattern_in_page(r"Launch\s+a\s+notebook")
    driver.find_element_by_id("logout").click()
    user.log("logout clicked")
Exemplo n.º 12
0
def scenario_default_dockerfile(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user,
                           'https://github.com/everware/runnable_examples')
    user.log("spawn 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_pattern_in_page(r"Launch\s+a\s+notebook")
    driver.find_element_by_id("logout").click()
    user.log("logout clicked")
Exemplo n.º 13
0
def scenario_timeout(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user, 'https://github.com/everware/test_long_creation')
    user.log("spawn clicked")
    user.wait_for_element_present(By.ID, "resist")
    assert "Building took too long" in driver.page_source or \
            "This image is too heavy to build" in driver.page_source
    user.log('correct, timeout happened')
    driver.find_element_by_id("resist").click()
    user.log("resist clicked")
    commons.fill_repo_info(driver, user, 'https://github.com/everware/test_long_creation')
    user.log("spawn clicked (second try)")
    user.wait_for_element_present(By.ID, "resist")
    assert "This image is too heavy to build" in driver.page_source
Exemplo n.º 14
0
def scenario_timeout(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user,
                           'https://github.com/everware/test_long_creation')
    user.log("spawn clicked")
    user.wait_for_element_present(By.ID, "resist")
    assert "Building took too long" in driver.page_source or \
            "This image is too heavy to build" in driver.page_source
    user.log('correct, timeout happened')
    driver.find_element_by_id("resist").click()
    user.log("resist clicked")
    commons.fill_repo_info(driver, user,
                           'https://github.com/everware/test_long_creation')
    user.log("spawn clicked (second try)")
    user.wait_for_element_present(By.ID, "resist")
    assert "This image is too heavy to build" in driver.page_source
Exemplo n.º 15
0
def scenario_default_private_repos(user):
    driver = commons.login(
        user, "a516f02935686c8e782" +
        "e958e6a627dc3a3b17baa")  # seems, github deletes public tokens
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(
        driver, user,
        "https://github.com/yandexdataschool/everware_private_test")
    user.log("spawn 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_pattern_in_page(r"Launch\s+a\s+notebook")
    driver.find_element_by_id("logout").click()
    user.log("logout clicked")
Exemplo n.º 16
0
def scenario_no_jupyter(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user, 'docker:busybox')
    user.log("spawn clicked")
    user.wait_for_element_present(By.ID, "resist")
    user.log("correct, no jupyter in container")
    driver.find_element_by_id("resist").click()
    commons.fill_repo_info(driver, user, user.repo)
    user.log("spawn clicked (second try)")
    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_pattern_in_page(r"Launch\s+a\s+notebook")
    driver.find_element_by_id("logout").click()
    user.log("logout clicked")
Exemplo n.º 17
0
def scenario_no_jupyter(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user, 'docker:busybox')
    user.log("spawn clicked")
    user.wait_for_element_present(By.ID, "resist")
    user.log("correct, no jupyter in container")
    driver.find_element_by_id("resist").click()
    commons.fill_repo_info(driver, user, user.repo)
    user.log("spawn clicked (second try)")
    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_pattern_in_page(r"Launch\s+a\s+notebook")
    driver.find_element_by_id("logout").click()
    user.log("logout clicked")
Exemplo n.º 18
0
def scenario_no_jupyter(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user, 'docker:busybox')
    user.log("spawn clicked")
    user.wait_for_element_present(By.ID, "resist")
    text = ("Something went wrong during building."
            " Error: Container doesn't have jupyter-singleuser inside")
    assert text in driver.page_source
    user.log("correct, no jupyter in container")
    driver.find_element_by_id("resist").click()
    commons.fill_repo_info(driver, user, user.repo)
    user.log("spawn clicked (second try)")
    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_pattern_in_page(r"Launch\s+a\s+notebook")
    driver.find_element_by_id("logout").click()
    user.log("logout clicked")
Exemplo n.º 19
0
def scenario_no_jupyter(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user, 'docker:busybox')
    user.log("spawn clicked")
    user.wait_for_element_present(By.ID, "resist")
    text = ("Something went wrong during building."
            " Error: Container doesn't have jupyter-singleuser inside")
    assert text in driver.page_source
    user.log("correct, no jupyter in container")
    driver.find_element_by_id("resist").click()
    commons.fill_repo_info(driver, user, user.repo)
    user.log("spawn clicked (second try)")
    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_pattern_in_page(r"Launch\s+a\s+notebook")
    driver.find_element_by_id("logout").click()
    user.log("logout clicked")
Exemplo n.º 20
0
def scenario_simple(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user, user.repo)
    user.log("spawn clicked")
    user.wait_for_element_present(By.LINK_TEXT, "Control Panel")
    old_files = get_files(driver)
    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_pattern_in_page(r"Launch\s+a\s+notebook")

    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user, 'https://github.com/everware/travis-test-repo')
    user.log("spawn clicked (second time)")
    user.wait_for_element_present(By.LINK_TEXT, "Control Panel")
    new_files = get_files(driver)

    assert old_files != new_files, """It's an old container:
    Old elems: %s, New elems: %s
    """ % (' '.join(old_files), ' '.join(new_files))
Exemplo n.º 21
0
def scenario_simple(user):
    driver = commons.login(user)
    user.wait_for_element_present(By.ID, "start")
    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user, user.repo)
    user.log("spawn clicked")
    user.wait_for_element_present(By.LINK_TEXT, "Control Panel")
    old_files = get_files(driver)
    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_pattern_in_page(r"Launch\s+a\s+notebook")

    driver.find_element_by_id("start").click()
    commons.fill_repo_info(driver, user,
                           'https://github.com/everware/travis-test-repo')
    user.log("spawn clicked (second time)")
    user.wait_for_element_present(By.LINK_TEXT, "Control Panel")
    new_files = get_files(driver)

    assert old_files != new_files, """It's an old container:
    Old elems: %s, New elems: %s
    """ % (' '.join(old_files), ' '.join(new_files))