various test fixes

This commit is contained in:
diginc
2017-01-10 20:38:42 -06:00
parent 2a973ed0e1
commit 136f43a995
4 changed files with 16 additions and 12 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ run_local = testinfra.get_backend(
@pytest.mark.parametrize("upstream,image,tag", [
( 'alpine:edge', 'alpine.docker', 'diginc/pi-hole:alpine' ),
( 'debian:jessie', 'debian.docker', 'diginc/pi-hole:debian' ),
( 'jsurf/rpi-raspbian', 'debian-armhf.docker', 'diginc/pi-hole:arm' ),
#( 'jsurf/rpi-raspbian', 'debian-armhf.docker', 'diginc/pi-hole:arm' ),
])
def test_build_pihole_image(upstream, image, tag):
run_local('docker pull {}'.format(upstream))
+4 -1
View File
@@ -38,7 +38,10 @@ def test_indecies_are_present(RunningPiHole):
File('/var/www/html/pihole/index.html').exists
File('/var/www/html/pihole/index.js').exists
@pytest.mark.parametrize('ip', [ '127.0.0.1', '[::]' ] )
@pytest.mark.parametrize('ip,args', [
('127.0.0.1', '-e ServerIP="192.168.100.2" -e VIRTUAL_HOST="127.0.0.1"'),
('[::]', '-e ServerIP="192.168.100.2" -e VIRTUAL_HOST="[::]"')
])
@pytest.mark.parametrize('url', [ '/', '/index.html', '/any.html' ] )
def test_html_index_requests_load_as_expected(RunningPiHole, ip, url):
command = 'curl -s -o /tmp/curled_file -w "%{{http_code}}" http://{}{}'.format(ip, url)