some of the debian_amd64 load_as_expected tests fixed, tab2spaces

This commit is contained in:
diginc 2017-12-07 23:30:54 -06:00
parent aab0b3f3cb
commit 988e17be7a
3 changed files with 23 additions and 17 deletions

View File

@ -276,7 +276,9 @@ test_framework_stubbing() {
if [ -n "$PYTEST" ] ; then
echo ":::::: Tests are being ran - stub out ad list fetching and add a fake ad block"
sed -i 's/^gravity_spinup$/#gravity_spinup # DISABLED FOR PYTEST/g' "$(which gravity.sh)"
echo 'testblock.pi-hole.local' >> /etc/pihole/black.list
echo '123.123.123.123 testblock.pi-hole.local' > /var/www/html/fake.list
echo 'file:///var/www/html/fake.list' > /etc/pihole/adlists.txt
echo 'http://localhost/fake.list' >> /etc/pihole/adlists.txt
fi
}

View File

@ -65,7 +65,11 @@ if [[ $USE_DEVELOPMENT_BRANCHES == true ]] ; then
pushd "${PI_HOLE_LOCAL_REPO}"; git checkout development; popd;
pushd "${webInterfaceDir}"; git checkout devel; popd;
else
pushd "${PI_HOLE_LOCAL_REPO}"; git reset --hard "${CORE_TAG}"; popd;
pushd "${PI_HOLE_LOCAL_REPO}";
git reset --hard "${CORE_TAG}";
# Can be removed once https://github.com/pi-hole/pi-hole/pull/1779 is in a release
git checkout 8d721d086cbe4b49665c9e0b1d81499b284776a9 gravity.sh
popd;
pushd "${webInterfaceDir}"; git reset --hard "${WEB_TAG}"; popd;
fi

View File

@ -65,7 +65,7 @@ def test_javascript_requests_load_as_expected(RunningPiHole, addr, url):
http_rc = RunningPiHole.run(command)
assert http_rc.rc == 0
assert int(http_rc.stdout) == 200
assert RunningPiHole.run('md5sum /tmp/curled_file /var/www/html/pihole/index.js').rc == 0
assert 'var x = "Pi-hole: A black hole for Internet advertisements."' in RunningPiHole.run('cat /tmp/curled_file').stdout
# IPv6 checks aren't passing CORS, removed :(
@pytest.mark.parametrize('addr', [ 'localhost' ] )