diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ec2b5728..19a89f1b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,16 +49,14 @@ jobs: matrix: distro: [ - debian_10, debian_11, debian_12, ubuntu_20, ubuntu_22, - ubuntu_23, ubuntu_24, centos_9, - fedora_39, fedora_40, + fedora_41, ] env: DISTRO: ${{matrix.distro}} diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index daa35a70..6c84369e 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1698,7 +1698,7 @@ install_dependent_packages() { for i in "$@"; do # For each package, check if it's already installed (and if so, don't add it to the installArray) printf " %b Checking for %s..." "${INFO}" "${i}" - if "${PKG_MANAGER}" -q list installed "${i}" &> /dev/null; then + if rpm -q "${i}" &> /dev/null; then printf "%b %b Checking for %s\\n" "${OVER}" "${TICK}" "${i}" else printf "%b %b Checking for %s (will be installed)\\n" "${OVER}" "${INFO}" "${i}" diff --git a/test/_debian_10.Dockerfile b/test/_debian_10.Dockerfile deleted file mode 100644 index 3b177cc8..00000000 --- a/test/_debian_10.Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM buildpack-deps:buster-scm - -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_39.Dockerfile b/test/_fedora_41.Dockerfile similarity index 97% rename from test/_fedora_39.Dockerfile rename to test/_fedora_41.Dockerfile index 1727a3aa..5297e2a8 100644 --- a/test/_fedora_39.Dockerfile +++ b/test/_fedora_41.Dockerfile @@ -1,4 +1,4 @@ -FROM fedora:39 +FROM fedora:41 RUN dnf install -y git initscripts ENV GITDIR /etc/.pihole diff --git a/test/_ubuntu_23.Dockerfile b/test/_ubuntu_23.Dockerfile deleted file mode 100644 index f9b3910b..00000000 --- a/test/_ubuntu_23.Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM buildpack-deps:lunar-scm - -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 -ENV DEBIAN_FRONTEND=noninteractive - -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/test_any_automated_install.py b/test/test_any_automated_install.py index c1b91664..a5038d3c 100644 --- a/test/test_any_automated_install.py +++ b/test/test_any_automated_install.py @@ -179,7 +179,7 @@ def test_installPihole_fresh_install_readableFiles(host): # Install FTL's development branch to get the latest features host.run( """ - echo "development" > /etc/pihole/ftlbranch + echo "master" > /etc/pihole/ftlbranch """ ) install = host.run( @@ -440,7 +440,7 @@ def test_installPihole_fresh_install_readableBlockpage(host, test_webpage): # Install FTL's development branch to get the latest features host.run( """ - echo "development" > /etc/pihole/ftlbranch + echo "master" > /etc/pihole/ftlbranch """ ) installWeb = host.run( @@ -893,7 +893,7 @@ def test_FTL_binary_installed_and_responsive_no_errors(host): source /opt/pihole/basic-install.sh create_pihole_user funcOutput=$(get_binary_name) - echo "development" > /etc/pihole/ftlbranch + echo "master" > /etc/pihole/ftlbranch binary="pihole-FTL${funcOutput##*pihole-FTL}" theRest="${funcOutput%pihole-FTL*}" FTLdetect "${binary}" "${theRest}" diff --git a/test/tox.debian_10.ini b/test/tox.debian_10.ini deleted file mode 100644 index f107300f..00000000 --- a/test/tox.debian_10.ini +++ /dev/null @@ -1,8 +0,0 @@ -[tox] -envlist = py3 - -[testenv:py3] -allowlist_externals = docker -deps = -rrequirements.txt -commands = docker buildx build --load --progress plain -f _debian_10.Dockerfile -t pytest_pihole:test_container ../ - pytest {posargs:-vv -n auto} ./test_any_automated_install.py ./test_any_utils.py diff --git a/test/tox.fedora_39.ini b/test/tox.fedora_41.ini similarity index 85% rename from test/tox.fedora_39.ini rename to test/tox.fedora_41.ini index 7a538371..2b95a670 100644 --- a/test/tox.fedora_39.ini +++ b/test/tox.fedora_41.ini @@ -4,5 +4,5 @@ envlist = py3 [testenv] allowlist_externals = docker deps = -rrequirements.txt -commands = docker buildx build --load --progress plain -f _fedora_39.Dockerfile -t pytest_pihole:test_container ../ +commands = docker buildx build --load --progress plain -f _fedora_41.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.ubuntu_23.ini b/test/tox.ubuntu_23.ini deleted file mode 100644 index 767ed9ef..00000000 --- a/test/tox.ubuntu_23.ini +++ /dev/null @@ -1,8 +0,0 @@ -[tox] -envlist = py3 - -[testenv:py3] -allowlist_externals = docker -deps = -rrequirements.txt -commands = docker buildx build --load --progress plain -f _ubuntu_23.Dockerfile -t pytest_pihole:test_container ../ - pytest {posargs:-vv -n auto} ./test_any_automated_install.py ./test_any_utils.py