From a705fbca7323ab7a134600aa662b187e23b25ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Thu, 29 Sep 2022 19:13:23 +0200 Subject: [PATCH 1/3] Add Fedora 35 and 36 to the test suite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- .github/workflows/test.yml | 11 ++++++++++- test/_fedora_35.Dockerfile | 18 ++++++++++++++++++ test/_fedora_36.Dockerfile | 18 ++++++++++++++++++ test/tox.fedora_35.ini | 8 ++++++++ test/tox.fedora_36.ini | 8 ++++++++ 5 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 test/_fedora_35.Dockerfile create mode 100644 test/_fedora_36.Dockerfile create mode 100644 test/tox.fedora_35.ini create mode 100644 test/tox.fedora_36.ini diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 442f1c0d..1f83c1b8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,7 +48,16 @@ jobs: fail-fast: false matrix: distro: - [debian_10, debian_11, ubuntu_20, ubuntu_22, centos_8, fedora_34] + [ + debian_10, + debian_11, + ubuntu_20, + ubuntu_22, + centos_8, + fedora_34, + fedora_35, + fedora_36, + ] env: DISTRO: ${{matrix.distro}} steps: diff --git a/test/_fedora_35.Dockerfile b/test/_fedora_35.Dockerfile new file mode 100644 index 00000000..eb3623d5 --- /dev/null +++ b/test/_fedora_35.Dockerfile @@ -0,0 +1,18 @@ +FROM fedora:35 +RUN dnf install -y git + +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 SKIP_INSTALL true +ENV OS_CHECK_DOMAIN_NAME dev-supportedos.pi-hole.net + +#sed '/# Start the installer/Q' /opt/pihole/basic-install.sh > /opt/pihole/stub_basic-install.sh && \ diff --git a/test/_fedora_36.Dockerfile b/test/_fedora_36.Dockerfile new file mode 100644 index 00000000..e0504538 --- /dev/null +++ b/test/_fedora_36.Dockerfile @@ -0,0 +1,18 @@ +FROM fedora:36 +RUN dnf install -y git + +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 SKIP_INSTALL true +ENV OS_CHECK_DOMAIN_NAME dev-supportedos.pi-hole.net + +#sed '/# Start the installer/Q' /opt/pihole/basic-install.sh > /opt/pihole/stub_basic-install.sh && \ diff --git a/test/tox.fedora_35.ini b/test/tox.fedora_35.ini new file mode 100644 index 00000000..5e90426d --- /dev/null +++ b/test/tox.fedora_35.ini @@ -0,0 +1,8 @@ +[tox] +envlist = py3 + +[testenv] +allowlist_externals = docker +deps = -rrequirements.txt +commands = docker build -f _fedora_35.Dockerfile -t pytest_pihole:test_container ../ + pytest {posargs:-vv -n auto} ./test_any_automated_install.py ./test_any_utils.py ./test_centos_fedora_common_support.py ./test_fedora_support.py diff --git a/test/tox.fedora_36.ini b/test/tox.fedora_36.ini new file mode 100644 index 00000000..1d250f82 --- /dev/null +++ b/test/tox.fedora_36.ini @@ -0,0 +1,8 @@ +[tox] +envlist = py3 + +[testenv] +allowlist_externals = docker +deps = -rrequirements.txt +commands = docker build -f _fedora_36.Dockerfile -t pytest_pihole:test_container ../ + pytest {posargs:-vv -n auto} ./test_any_automated_install.py ./test_any_utils.py ./test_centos_fedora_common_support.py ./test_fedora_support.py From 6057b134ae34c44131cd4648b957819d85bb2da0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sat, 1 Oct 2022 10:03:13 +0200 Subject: [PATCH 2/3] Add initscripts to Fedora 35 and 36 dockerfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- test/_fedora_35.Dockerfile | 2 +- test/_fedora_36.Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/_fedora_35.Dockerfile b/test/_fedora_35.Dockerfile index eb3623d5..83c17650 100644 --- a/test/_fedora_35.Dockerfile +++ b/test/_fedora_35.Dockerfile @@ -1,5 +1,5 @@ FROM fedora:35 -RUN dnf install -y git +RUN dnf install -y git initscripts ENV GITDIR /etc/.pihole ENV SCRIPTDIR /opt/pihole diff --git a/test/_fedora_36.Dockerfile b/test/_fedora_36.Dockerfile index e0504538..847767e7 100644 --- a/test/_fedora_36.Dockerfile +++ b/test/_fedora_36.Dockerfile @@ -1,5 +1,5 @@ FROM fedora:36 -RUN dnf install -y git +RUN dnf install -y git initscripts ENV GITDIR /etc/.pihole ENV SCRIPTDIR /opt/pihole From 3731b65bd59ce73115c8f55c548b01f3c0495af3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sat, 1 Oct 2022 10:04:26 +0200 Subject: [PATCH 3/3] Remoce Fedora 34 from tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- .github/workflows/test.yml | 1 - test/_fedora_34.Dockerfile | 18 ------------------ test/tox.fedora_34.ini | 8 -------- 3 files changed, 27 deletions(-) delete mode 100644 test/_fedora_34.Dockerfile delete mode 100644 test/tox.fedora_34.ini diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1f83c1b8..bb2d68d5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -54,7 +54,6 @@ jobs: ubuntu_20, ubuntu_22, centos_8, - fedora_34, fedora_35, fedora_36, ] diff --git a/test/_fedora_34.Dockerfile b/test/_fedora_34.Dockerfile deleted file mode 100644 index 9c90ce7d..00000000 --- a/test/_fedora_34.Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM fedora:34 -RUN dnf install -y git - -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 SKIP_INSTALL true -ENV OS_CHECK_DOMAIN_NAME dev-supportedos.pi-hole.net - -#sed '/# Start the installer/Q' /opt/pihole/basic-install.sh > /opt/pihole/stub_basic-install.sh && \ diff --git a/test/tox.fedora_34.ini b/test/tox.fedora_34.ini deleted file mode 100644 index d58cb0d4..00000000 --- a/test/tox.fedora_34.ini +++ /dev/null @@ -1,8 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -allowlist_externals = docker -deps = -rrequirements.txt -commands = docker build -f _fedora_34.Dockerfile -t pytest_pihole:test_container ../ - pytest {posargs:-vv -n auto} ./test_any_automated_install.py ./test_any_utils.py ./test_centos_fedora_common_support.py ./test_fedora_support.py