From b82487ee6a07486693fb58c0e0ce1653a7c8ffc2 Mon Sep 17 00:00:00 2001 From: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com> Date: Sun, 4 May 2025 12:01:09 +0200 Subject: [PATCH] Add Fedora 42 to tests Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com> --- .github/workflows/test.yml | 1 + test/_fedora_42.Dockerfile | 17 +++++++++++++++++ test/test_any_automated_install.py | 1 + test/tox.fedora_42.ini | 10 ++++++++++ 4 files changed, 29 insertions(+) create mode 100644 test/_fedora_42.Dockerfile create mode 100644 test/tox.fedora_42.ini diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 26435035..ac496406 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -72,6 +72,7 @@ jobs: centos_10, fedora_40, fedora_41, + fedora_42, ] env: DISTRO: ${{matrix.distro}} diff --git a/test/_fedora_42.Dockerfile b/test/_fedora_42.Dockerfile new file mode 100644 index 00000000..90b17c0b --- /dev/null +++ b/test/_fedora_42.Dockerfile @@ -0,0 +1,17 @@ +FROM fedora:42 +RUN dnf install -y git initscripts + +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 $GITDIR/advanced/Scripts/COL_TABLE $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 + +#sed '/# Start the installer/Q' /opt/pihole/basic-install.sh > /opt/pihole/stub_basic-install.sh && \ diff --git a/test/test_any_automated_install.py b/test/test_any_automated_install.py index e72b4779..0fa0453a 100644 --- a/test/test_any_automated_install.py +++ b/test/test_any_automated_install.py @@ -245,6 +245,7 @@ def test_FTL_detect_no_errors(host, arch, detected_string, supported): { "-A /bin/sh": ("Tag_CPU_arch: " + arch, "0"), "-A /usr/bin/sh": ("Tag_CPU_arch: " + arch, "0"), + "-A /usr/sbin/sh": ("Tag_CPU_arch: " + arch, "0"), }, host, ) diff --git a/test/tox.fedora_42.ini b/test/tox.fedora_42.ini new file mode 100644 index 00000000..67eb77e4 --- /dev/null +++ b/test/tox.fedora_42.ini @@ -0,0 +1,10 @@ +[tox] +envlist = py3 + +[testenv] +allowlist_externals = docker +deps = -rrequirements.txt +setenv = + COLUMNS=120 +commands = docker buildx build --load --progress plain -f _fedora_42.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