diff --git a/.github/workflows/test-only.yml b/.github/workflows/test-only.yml index 02b967836..0881b8d7e 100644 --- a/.github/workflows/test-only.yml +++ b/.github/workflows/test-only.yml @@ -57,6 +57,7 @@ jobs: # Settings headers playwright tests - Call back in from Browserless, check headers docker run --name "changedet" --hostname changedet --rm -e "FLASK_SERVER_NAME=changedet" -e "PLAYWRIGHT_DRIVER_URL=ws://browserless:3000?dumpio=true" --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' + 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' docker run --name "changedet" --hostname changedet --rm -e "FLASK_SERVER_NAME=changedet" -e "USE_EXPERIMENTAL_PUPPETEER_FETCH=yes" -e "PLAYWRIGHT_DRIVER_URL=ws://browserless:3000?dumpio=true" --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' # restock detection via playwright - added name=changedet here so that playwright/browserless can connect to it diff --git a/changedetectionio/tests/test_request.py b/changedetectionio/tests/test_request.py index 51cc39706..1aaba8b8d 100644 --- a/changedetectionio/tests/test_request.py +++ b/changedetectionio/tests/test_request.py @@ -13,7 +13,7 @@ def test_headers_in_request(client, live_server): #live_server_setup(live_server) # Add our URL to the import page test_url = url_for('test_headers', _external=True) - if os.getenv('PLAYWRIGHT_DRIVER_URL'): + if os.getenv('PLAYWRIGHT_DRIVER_URL') or os.getenv('WEBDRIVER_URL'): # Because its no longer calling back to localhost but from browserless, set in test-only.yml test_url = test_url.replace('localhost', 'changedet')