mirror of
https://github.com/openzim/zimit.git
synced 2025-09-23 03:52:16 -04:00
Merge pull request #401 from openzim/skip_youtube_test
Add logic to skip Youtube test on-demand
This commit is contained in:
commit
f17e15287e
6
.github/workflows/DailyTests.yaml
vendored
6
.github/workflows/DailyTests.yaml
vendored
@ -27,8 +27,8 @@ jobs:
|
|||||||
path: output/tests_eng_test-website.zim
|
path: output/tests_eng_test-website.zim
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
- name: build selenium test image
|
- name: build tests-daily Docker image
|
||||||
run: docker build -t local-selenium tests-daily
|
run: docker build -t local-tests-daily tests-daily
|
||||||
|
|
||||||
- name: run integration test suite
|
- name: run integration test suite
|
||||||
run: docker run -v $PWD/tests-daily/daily.py:/app/daily.py -v $PWD/output:/output local-selenium bash -c "cd /app && pytest -h && pytest -v --log-level=INFO --log-format='%(levelname)s - %(message)s' daily.py"
|
run: docker run -e SKIP_YOUTUBE_TEST="True" -v $PWD/tests-daily/daily.py:/app/daily.py -v $PWD/output:/output local-tests-daily bash -c "cd /app && pytest -v --log-level=INFO --log-format='%(levelname)s - %(message)s' daily.py"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
@ -15,6 +16,8 @@ KIWIX_SERVE_START_SLEEP = 1
|
|||||||
ZIM_NAME = "tests_eng_test-website"
|
ZIM_NAME = "tests_eng_test-website"
|
||||||
YOUTUBE_VIDEO_PATH = "youtube.fuzzy.replayweb.page/embed/g5skcrNXdDM"
|
YOUTUBE_VIDEO_PATH = "youtube.fuzzy.replayweb.page/embed/g5skcrNXdDM"
|
||||||
|
|
||||||
|
SKIP_YOUTUBE_TEST = os.getenv("SKIP_YOUTUBE_TEST", "False").lower() == "true"
|
||||||
|
|
||||||
CHECK_VIDEO_IS_PLAYING_AFTER_SECS = 30
|
CHECK_VIDEO_IS_PLAYING_AFTER_SECS = 30
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@ -79,6 +82,7 @@ def kiwix_serve():
|
|||||||
process.terminate()
|
process.terminate()
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(SKIP_YOUTUBE_TEST, reason="Youtube test disabled by environment")
|
||||||
def test_youtube_video(chrome_driver, kiwix_serve): # noqa: ARG001
|
def test_youtube_video(chrome_driver, kiwix_serve): # noqa: ARG001
|
||||||
"""Test that youtube video loads, and still plays after a while"""
|
"""Test that youtube video loads, and still plays after a while"""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user