mirror of
https://github.com/openzim/zimit.git
synced 2025-09-20 10:13:52 -04:00
Add logic to skip Youtube test on-demand
This commit is contained in:
parent
5fe6539201
commit
b056c6dc4f
6
.github/workflows/DailyTests.yaml
vendored
6
.github/workflows/DailyTests.yaml
vendored
@ -27,8 +27,8 @@ jobs:
|
||||
path: output/tests_eng_test-website.zim
|
||||
retention-days: 30
|
||||
|
||||
- name: build selenium test image
|
||||
run: docker build -t local-selenium tests-daily
|
||||
- name: build tests-daily Docker image
|
||||
run: docker build -t local-tests-daily tests-daily
|
||||
|
||||
- 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 os
|
||||
import subprocess
|
||||
from time import sleep
|
||||
|
||||
@ -15,6 +16,8 @@ KIWIX_SERVE_START_SLEEP = 1
|
||||
ZIM_NAME = "tests_eng_test-website"
|
||||
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
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@ -79,6 +82,7 @@ def kiwix_serve():
|
||||
process.terminate()
|
||||
|
||||
|
||||
@pytest.mark.skipif(SKIP_YOUTUBE_TEST, reason="Youtube test disabled by environment")
|
||||
def test_youtube_video(chrome_driver, kiwix_serve): # noqa: ARG001
|
||||
"""Test that youtube video loads, and still plays after a while"""
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user