Test improvements (#1264)

pull/1267/head
dgtlmoon 2 years ago committed by GitHub
parent f0966eb23a
commit fc6424c39e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -61,7 +61,6 @@ jobs:
./run_proxy_tests.sh ./run_proxy_tests.sh
cd .. cd ..
- name: Test changedetection.io container starts+runs basically without error - name: Test changedetection.io container starts+runs basically without error
run: | run: |
docker run -p 5556:5000 -d test-changedetectionio docker run -p 5556:5000 -d test-changedetectionio

@ -11,7 +11,7 @@ docker run --network changedet-network -d --name squid-two --hostname squid-two
# Used for configuring a custom proxy URL via the UI # Used for configuring a custom proxy URL via the UI
docker run --network changedet-network -d \ docker run --network changedet-network -d \
--name squid-custom \ --name squid-custom \
--hostname squid-squid-custom \ --hostname squid-custom \
--rm \ --rm \
-v `pwd`/tests/proxy_list/squid-auth.conf:/etc/squid/conf.d/debian.conf \ -v `pwd`/tests/proxy_list/squid-auth.conf:/etc/squid/conf.d/debian.conf \
-v `pwd`/tests/proxy_list/squid-passwords.txt:/etc/squid3/passwords \ -v `pwd`/tests/proxy_list/squid-passwords.txt:/etc/squid3/passwords \
@ -57,3 +57,5 @@ then
echo "Did not see a valid request to changedetection.io in the squid logs (while checking preferred proxy - squid two)" echo "Did not see a valid request to changedetection.io in the squid logs (while checking preferred proxy - squid two)"
exit 1 exit 1
fi fi
docker kill squid-one squid-two squid-custom

@ -38,13 +38,12 @@ def test_select_custom(client, live_server):
res = client.get(url_for("index")) res = client.get(url_for("index"))
assert b'Proxy Authentication Required' not in res.data assert b'Proxy Authentication Required' not in res.data
res = client.get( res = client.get(
url_for("preview_page", uuid="first"), url_for("preview_page", uuid="first"),
follow_redirects=True follow_redirects=True
) )
# We should see something via proxy # We should see something via proxy
assert b'HEAD' in res.data assert b'<div class=""> - 0.' in res.data
# #
# Now we should see the request in the container logs for "squid-squid-custom" because it will be the only default # Now we should see the request in the container logs for "squid-squid-custom" because it will be the only default

Loading…
Cancel
Save