Files
docker-pi-hole/test/test_000_build_containers.py
diginc 822903189c Fixing issues with 1.9.2
- Case on IPv4addr was incorrect, gravity now requires it instead of piholeIP file
- debian:jessie no longer had dnsutils dig?  odd.
- py.test always pull the latest docker images to help reveal base image changes like above
- py.test stubbing of gravity was acciently not present in debian arm's start.sh
- pihole submodule using development branch latest
2016-10-06 18:51:05 -05:00

21 lines
726 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-armhf:debian' ),
])
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