ipv6 tests I skipped the other night
This commit is contained in:
parent
2e8ff99f9a
commit
e8cb52b23a
|
@ -33,24 +33,27 @@ 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('url', [ '/', '/index.html', '/any.html' ] )
|
||||
def test_html_index_requests_load_as_expected(RunningPiHole, url):
|
||||
command = 'curl -s -o /tmp/curled_file -w "%{{http_code}}" http://127.0.0.1{}'.format(url)
|
||||
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)
|
||||
http_rc = RunningPiHole.run(command)
|
||||
assert RunningPiHole.run('md5sum /tmp/curled_file /var/www/html/pihole/index.html').rc == 0
|
||||
assert int(http_rc.stdout) == 200
|
||||
|
||||
@pytest.mark.parametrize('ip', [ '127.0.0.1', '[::]' ] )
|
||||
@pytest.mark.parametrize('url', [ '/index.js', '/any.js'] )
|
||||
def test_javascript_requests_load_as_expected(RunningPiHole, url):
|
||||
command = 'curl -s -o /tmp/curled_file -w "%{{http_code}}" http://127.0.0.1{}'.format(url)
|
||||
def test_javascript_requests_load_as_expected(RunningPiHole, ip, url):
|
||||
command = 'curl -s -o /tmp/curled_file -w "%{{http_code}}" http://{}{}'.format(ip, url)
|
||||
print command
|
||||
http_rc = RunningPiHole.run(command)
|
||||
assert RunningPiHole.run('md5sum /tmp/curled_file /var/www/html/pihole/index.js').rc == 0
|
||||
assert int(http_rc.stdout) == 200
|
||||
|
||||
@pytest.mark.parametrize('ip', [ '127.0.0.1', '[::]' ] )
|
||||
@pytest.mark.parametrize('url', [ '/admin/', '/admin/index.php' ] )
|
||||
def test_admin_requests_load_as_expected(RunningPiHole, url):
|
||||
command = 'curl -s -o /tmp/curled_file -w "%{{http_code}}" http://127.0.0.1{}'.format(url)
|
||||
def test_admin_requests_load_as_expected(RunningPiHole, ip, url):
|
||||
command = 'curl -s -o /tmp/curled_file -w "%{{http_code}}" http://{}{}'.format(ip, url)
|
||||
http_rc = RunningPiHole.run(command)
|
||||
assert int(http_rc.stdout) == 200
|
||||
assert RunningPiHole.run('wc -l /tmp/curled_file ') > 10
|
||||
|
|
Loading…
Reference in New Issue