mirror of
https://github.com/pi-hole/pi-hole
synced 2024-11-17 13:50:33 +00:00
test with both centos7 and centos8 images
Signed-off-by: bcambl <blayne@blaynecampbell.com>
This commit is contained in:
parent
5aab68ab41
commit
2c461460db
@ -1,4 +1,4 @@
|
||||
FROM centos:7
|
||||
FROM centos:8
|
||||
|
||||
ENV GITDIR /etc/.pihole
|
||||
ENV SCRIPTDIR /opt/pihole
|
||||
|
16
test/centos7.Dockerfile
Normal file
16
test/centos7.Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
FROM centos:7
|
||||
|
||||
ENV GITDIR /etc/.pihole
|
||||
ENV SCRIPTDIR /opt/pihole
|
||||
|
||||
RUN mkdir -p $GITDIR $SCRIPTDIR /etc/pihole
|
||||
ADD . $GITDIR
|
||||
RUN cp $GITDIR/advanced/Scripts/*.sh $GITDIR/gravity.sh $GITDIR/pihole $GITDIR/automated\ install/*.sh $SCRIPTDIR/
|
||||
ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$SCRIPTDIR
|
||||
|
||||
RUN true && \
|
||||
chmod +x $SCRIPTDIR/*
|
||||
|
||||
ENV PH_TEST true
|
||||
|
||||
#sed '/# Start the installer/Q' /opt/pihole/basic-install.sh > /opt/pihole/stub_basic-install.sh && \
|
@ -69,7 +69,7 @@ def args(request):
|
||||
return '-t -d'
|
||||
|
||||
|
||||
@pytest.fixture(params=['debian', 'centos', 'fedora'])
|
||||
@pytest.fixture(params=['debian', 'centos7', 'centos', 'fedora'])
|
||||
def tag(request):
|
||||
'''
|
||||
consumed by image to make the test matrix
|
||||
|
@ -9,6 +9,7 @@ run_local = testinfra.get_backend(
|
||||
|
||||
@pytest.mark.parametrize("image,tag", [
|
||||
('test/debian.Dockerfile', 'pytest_pihole:debian'),
|
||||
('test/centos7.Dockerfile', 'pytest_pihole:centos7'),
|
||||
('test/centos.Dockerfile', 'pytest_pihole:centos'),
|
||||
('test/fedora.Dockerfile', 'pytest_pihole:fedora'),
|
||||
])
|
||||
|
@ -123,7 +123,7 @@ def test_enable_epel_repository_centos(Pihole):
|
||||
assert epel_package.is_installed
|
||||
|
||||
|
||||
@pytest.mark.parametrize("tag", [('centos'), ])
|
||||
@pytest.mark.parametrize("tag", [('centos7'), ('centos8'), ])
|
||||
def test_php_upgrade_default_optout_centos(Pihole):
|
||||
'''
|
||||
confirms the default behavior to opt-out of installing PHP7 from REMI
|
||||
@ -139,7 +139,7 @@ def test_php_upgrade_default_optout_centos(Pihole):
|
||||
assert not remi_package.is_installed
|
||||
|
||||
|
||||
@pytest.mark.parametrize("tag", [('centos'), ])
|
||||
@pytest.mark.parametrize("tag", [('centos7'), ('centos8'), ])
|
||||
def test_php_upgrade_user_optout_centos(Pihole):
|
||||
'''
|
||||
confirms installer behavior when user opt-out of installing PHP7 from REMI
|
||||
@ -158,7 +158,7 @@ def test_php_upgrade_user_optout_centos(Pihole):
|
||||
assert not remi_package.is_installed
|
||||
|
||||
|
||||
@pytest.mark.parametrize("tag", [('centos'), ])
|
||||
@pytest.mark.parametrize("tag", [('centos7'), ('centos8'), ])
|
||||
def test_php_upgrade_user_optin_centos(Pihole):
|
||||
'''
|
||||
confirms installer behavior when user opt-in to installing PHP7 from REMI
|
||||
@ -181,7 +181,7 @@ def test_php_upgrade_user_optin_centos(Pihole):
|
||||
assert remi_package.is_installed
|
||||
|
||||
|
||||
@pytest.mark.parametrize("tag", [('centos'), ])
|
||||
@pytest.mark.parametrize("tag", [('centos7'), ('centos8'), ])
|
||||
def test_php_version_lt_7_detected_upgrade_default_optout_centos(Pihole):
|
||||
'''
|
||||
confirms the default behavior to opt-out of upgrading to PHP7 from REMI
|
||||
|
1
tox.ini
1
tox.ini
@ -5,6 +5,7 @@ envlist = py37
|
||||
whitelist_externals = docker
|
||||
deps = -rrequirements.txt
|
||||
commands = docker build -f test/debian.Dockerfile -t pytest_pihole:debian .
|
||||
docker build -f test/centos7.Dockerfile -t pytest_pihole:centos7 .
|
||||
docker build -f test/centos.Dockerfile -t pytest_pihole:centos .
|
||||
docker build -f test/fedora.Dockerfile -t pytest_pihole:fedora .
|
||||
pytest {posargs:-vv -n auto} -m "not build_stage" ./test/
|
||||
|
Loading…
Reference in New Issue
Block a user