mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-21 23:00:18 +00:00
setupVar tests passing for debian & centos
This commit is contained in:
parent
aa23fb1d56
commit
a03caea549
9 changed files with 178 additions and 1 deletions
18
test/test_000_build_containers.py
Normal file
18
test/test_000_build_containers.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
''' 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("image,tag", [
|
||||
( 'test/debian.Dockerfile', 'pytest_pihole:debian' ),
|
||||
( 'test/centos.Dockerfile', 'pytest_pihole:centos' ),
|
||||
])
|
||||
def test_build_pihole_image(image, tag):
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue