mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Add in a test case
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
parent
11679a5188
commit
494734bf27
1 changed files with 27 additions and 0 deletions
|
@ -1151,3 +1151,30 @@ def test_package_manager_has_web_deps(host):
|
||||||
|
|
||||||
assert "No package" not in output.stdout
|
assert "No package" not in output.stdout
|
||||||
assert output.rc == 0
|
assert output.rc == 0
|
||||||
|
|
||||||
|
|
||||||
|
def test_webpage_sh_valid_domain(host):
|
||||||
|
"""Confirms checkDomain function in webpage.sh works as expected"""
|
||||||
|
check1 = host.run(
|
||||||
|
"""
|
||||||
|
source /opt/pihole/webpage.sh
|
||||||
|
checkDomain "pi-hole.net"
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
check2 = host.run(
|
||||||
|
"""
|
||||||
|
source /opt/pihole/webpage.sh
|
||||||
|
checkDomain "ab.pi-hole.net"
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
check3 = host.run(
|
||||||
|
"""
|
||||||
|
source /opt/pihole/webpage.sh
|
||||||
|
checkDomain "abc.pi-hole.net"
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
assert "pi-hole.net" in check1.stdout
|
||||||
|
assert "ab.pi-hole.net" in check2.stdout
|
||||||
|
assert "abc.pi-hole.net" in check3.stdout
|
||||||
|
|
Loading…
Reference in a new issue