mirror of
https://github.com/pi-hole/docker-pi-hole.git
synced 2025-12-24 20:35:42 +00:00
Fix to debian lighttpd php config #19 w/tests
This commit is contained in:
14
test/test_start.py
Normal file
14
test/test_start.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import pytest
|
||||
import testinfra
|
||||
|
||||
# This test will run on both debian:jessie and centos:7 images
|
||||
def test_ServerIP_missing_env_triggers_error(Command):
|
||||
start = Command.run('/start.sh')
|
||||
error_msg = "ERROR: To function correctly you must pass an environment variables of 'ServerIP' into the docker container"
|
||||
assert start.rc == 1
|
||||
assert error_msg in start.stdout
|
||||
|
||||
@pytest.mark.docker_args('-e ServerIP="192.168.1.2"')
|
||||
@pytest.mark.docker_cmd('/start.sh')
|
||||
def test_ServerIP_allows_normal_startup(Command):
|
||||
assert Command.run('pgrep -f /start.sh | wc') != 0
|
||||
Reference in New Issue
Block a user