1
0
mirror of https://github.com/pi-hole/docker-pi-hole.git synced 2024-06-30 05:01:00 +02:00
docker-pi-hole/test/test_000_build_containers.py
diginc c9468eaabd Pi-hole and Web versions update + new stuff
* New code in shell scripts required killing systemctl in images
* Added tests for the quick IPv6 env hack I made a while back
* Stopped requiring the need for update.sh to copy gravity for alpine
 * (moved modifications to dockerfile)
* One step closer to unified start script for both OS versions
* Optimzed some test code
2016-10-20 22:44:44 -05:00

21 lines
717 B
Python

''' This file starts with 000 to make it run first '''
import pytest
import testinfra
run_local = testinfra.get_backend(
"local://"
).get_module("Command").run
@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' ),
])
def test_build_pihole_image(upstream, image, tag):
run_local('docker pull {}'.format(upstream))
build_cmd = run_local('docker build -f {} -t {} .'.format(image, tag))
if build_cmd.rc != 0:
print build_cmd.stdout
print build_cmd.stderr
assert build_cmd.rc == 0