diff --git a/.github/workflows/test-stack-reusable-workflow.yml b/.github/workflows/test-stack-reusable-workflow.yml index 62a4ea2ea..ed004d706 100644 --- a/.github/workflows/test-stack-reusable-workflow.yml +++ b/.github/workflows/test-stack-reusable-workflow.yml @@ -96,7 +96,7 @@ jobs: - name: Test built container with Pytest run: | - docker run --name test-cdio-basic-tests test-changedetectionio bash -c 'cd changedetectionio && ./run_basic_tests.sh' + docker run --name test-cdio-basic-tests --network changedet-network test-changedetectionio bash -c 'cd changedetectionio && ./run_basic_tests.sh' - name: Extract memory report and logs if: always() @@ -215,14 +215,17 @@ jobs: run: | docker network create changedet-network docker run --network changedet-network -d --hostname selenium -p 4444:4444 --rm --shm-size="2g" selenium/standalone-chrome:4 + sleep 3 + + - name: Specific tests for headers and requests checks with Selenium + run: | + + docker run --name "changedet" --hostname changedet --rm -e "FLASK_SERVER_NAME=changedet" -e "WEBDRIVER_URL=http://selenium:4444/wd/hub" --network changedet-network test-changedetectionio bash -c 'cd changedetectionio; pytest --live-server-host=0.0.0.0 --live-server-port=5004 tests/test_request.py' - name: Specific tests in built container for Selenium run: | docker run --rm -e "WEBDRIVER_URL=http://selenium:4444/wd/hub" --network changedet-network test-changedetectionio bash -c 'cd changedetectionio;pytest tests/fetchers/test_content.py && pytest tests/test_errorhandling.py' - - name: Specific tests for headers and requests checks with Selenium - run: | - docker run --name "changedet" --hostname changedet --rm -e "FLASK_SERVER_NAME=changedet" -e "WEBDRIVER_URL=http://selenium:4444/wd/hub" --network changedet-network test-changedetectionio bash -c 'cd changedetectionio; pytest --live-server-host=0.0.0.0 --live-server-port=5004 tests/test_request.py' # SMTP tests smtp-tests: diff --git a/changedetectionio/run_custom_browser_url_tests.sh b/changedetectionio/run_custom_browser_url_tests.sh index dc91d498d..b0b6e458d 100755 --- a/changedetectionio/run_custom_browser_url_tests.sh +++ b/changedetectionio/run_custom_browser_url_tests.sh @@ -6,6 +6,7 @@ # enable debug set -x +docker network inspect changedet-network >/dev/null 2>&1 || docker network create changedet-network # A extra browser is configured, but we never chose to use it, so it should NOT show in the logs docker run --rm -e "PLAYWRIGHT_DRIVER_URL=ws://sockpuppetbrowser:3000" --network changedet-network test-changedetectionio bash -c 'cd changedetectionio;pytest tests/custom_browser_url/test_custom_browser_url.py::test_request_not_via_custom_browser_url'