From 7cdb807f2ceb8be757ecf14acc60beef4fc9b699 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 29 Aug 2017 00:51:39 -0400 Subject: [tests] reuse tox virtualenv for e2e/functional --- .gitlab-ci.yml | 25 ++++++++++++++++++++----- tests/functional/features/environment.py | 2 +- tests/functional/features/steps/common.py | 5 ++--- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 12a0182..8d90eb3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ stages: - test - e2e + - functional - bundle - test_bundle - build_ui @@ -15,6 +16,11 @@ linux_test: stage: test script: - tox --recreate -e py27-dev + artifacts: + paths: + - .tox/py27-dev + name: "bitmask virtualenv ${CI_BUILD_REF}" + expire_in: 1 week tags: - linux @@ -47,25 +53,34 @@ e2e_tests: image: 0xacab.org:4567/leap/bitmask-dev:latest stage: e2e allow_failure: true + dependencies: + - linux_test script: - - virtualenv venv - - source venv/bin/activate + - source .tox/py27-dev/bin/activate - make dev-latest-backend - mkdir -p /root/.config/leap/ - make install_helpers - make test_e2e + artifacts: + paths: + - .tox/py27-dev + name: "bitmask virtualenv ${CI_BUILD_REF} (e2e)" + expire_in: 1 week tags: - linux functional_tests: image: 0xacab.org:4567/leap/bitmask-dev:latest - stage: e2e + stage: functional + dependencies: + - e2e_tests before_script: - - virtualenv venv - - source venv/bin/activate + - source .tox/py27-dev/bin/activate - make dev-latest-all - make test_functional_setup script: + - whoami + - ls -la /dev/net/tun - make test_functional artifacts: when: on_failure diff --git a/tests/functional/features/environment.py b/tests/functional/features/environment.py index be7404c..a7f65dd 100644 --- a/tests/functional/features/environment.py +++ b/tests/functional/features/environment.py @@ -11,7 +11,7 @@ from selenium.webdriver.chrome.options import Options from leap.common.config import get_path_prefix -DEFAULT_IMPLICIT_WAIT_TIMEOUT_IN_S = 10 +DEFAULT_IMPLICIT_WAIT_TIMEOUT_IN_S = 20 HOME_PATH = os.path.abspath('./tmp/bitmask-test') VIRTUALENV = 'virtualenv' diff --git a/tests/functional/features/steps/common.py b/tests/functional/features/steps/common.py index d214af0..749b65f 100644 --- a/tests/functional/features/steps/common.py +++ b/tests/functional/features/steps/common.py @@ -7,9 +7,8 @@ from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.wait import WebDriverWait -TIMEOUT_IN_S = 20 - -DEFAULT_IMPLICIT_WAIT_TIMEOUT_IN_S = 10 +TIMEOUT_IN_S = 30 +DEFAULT_IMPLICIT_WAIT_TIMEOUT_IN_S = 20 def wait_until_element_is_invisible_by_locator(context, locator_tuple, -- cgit v1.2.3