From 2b8905f6321542b21228cd5db9a5958b1f319355 Mon Sep 17 00:00:00 2001 From: Paul McLanahan Date: Mon, 18 Dec 2017 20:44:55 -0500 Subject: [PATCH] Avoid testing all download URLs more than once per deployment --- docker/bin/run_integration_tests.sh | 4 ++++ jenkins/branches/master.yml | 1 + jenkins/branches/prod.yml | 1 + jenkins/branches/run-integration-tests.yml | 1 + jenkins/utils.groovy | 2 +- tests/functional/test_download.py | 4 ++-- tests/functional/test_download_l10n.py | 4 ++-- 7 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docker/bin/run_integration_tests.sh b/docker/bin/run_integration_tests.sh index 0394122c54..c2331040d1 100755 --- a/docker/bin/run_integration_tests.sh +++ b/docker/bin/run_integration_tests.sh @@ -25,6 +25,10 @@ case $1 in PLATFORM="Windows 7" MARK_EXPRESSION="sanity and not headless" ;; + download) + DRIVER= + MARK_EXPRESSION=download + ;; headless) DRIVER= MARK_EXPRESSION=headless diff --git a/jenkins/branches/master.yml b/jenkins/branches/master.yml index 75ce4d3835..08e0aaa1ba 100644 --- a/jenkins/branches/master.yml +++ b/jenkins/branches/master.yml @@ -12,6 +12,7 @@ integration_tests: usw: - firefox - headless + - download tokyo: - headless frankfurt: diff --git a/jenkins/branches/prod.yml b/jenkins/branches/prod.yml index a3baaef263..fdf099cd3b 100644 --- a/jenkins/branches/prod.yml +++ b/jenkins/branches/prod.yml @@ -13,6 +13,7 @@ apps: integration_tests: usw: - headless + - download - firefox - chrome - ie diff --git a/jenkins/branches/run-integration-tests.yml b/jenkins/branches/run-integration-tests.yml index 6253adddcf..b8680e190e 100644 --- a/jenkins/branches/run-integration-tests.yml +++ b/jenkins/branches/run-integration-tests.yml @@ -8,6 +8,7 @@ apps: integration_tests: usw: - headless + - download - firefox - chrome - ie diff --git a/jenkins/utils.groovy b/jenkins/utils.groovy index 7d829442c2..d30dc4fc30 100644 --- a/jenkins/utils.groovy +++ b/jenkins/utils.groovy @@ -63,7 +63,7 @@ def integrationTestJob(propFileName, appURL='') { usernameVariable: 'SAUCELABS_USERNAME', passwordVariable: 'SAUCELABS_API_KEY']]) { withEnv(["BASE_URL=${appURL}"]) { - retry(3) { + retry(2) { try { sh testScript } diff --git a/tests/functional/test_download.py b/tests/functional/test_download.py index 0da5b0b3d7..e8289bde45 100644 --- a/tests/functional/test_download.py +++ b/tests/functional/test_download.py @@ -8,7 +8,7 @@ import requests def pytest_generate_tests(metafunc): - if 'not headless' in metafunc.config.option.markexpr: + if 'not download' in metafunc.config.option.markexpr: return # test deslected by mark expression base_url = metafunc.config.option.base_url if not base_url: @@ -35,7 +35,7 @@ def pytest_generate_tests(metafunc): metafunc.parametrize('url', argvalues) -@pytest.mark.headless +@pytest.mark.download @pytest.mark.nondestructive def test_download_links(url): r = requests.head(url, allow_redirects=True) diff --git a/tests/functional/test_download_l10n.py b/tests/functional/test_download_l10n.py index 278c7a9320..33a26ef5e4 100644 --- a/tests/functional/test_download_l10n.py +++ b/tests/functional/test_download_l10n.py @@ -8,7 +8,7 @@ import requests def pytest_generate_tests(metafunc): - if 'not headless' in metafunc.config.option.markexpr: + if 'not download' in metafunc.config.option.markexpr: return # test deslected by mark expression base_url = metafunc.config.option.base_url if not base_url: @@ -41,7 +41,7 @@ def pytest_generate_tests(metafunc): metafunc.parametrize('url', argvalues) -@pytest.mark.headless +@pytest.mark.download @pytest.mark.nondestructive def test_localized_download_links(url): r = requests.head(url, allow_redirects=True)