fix the fail2ban issues and other things
shellcheck / shellcheck (push) Successful in 11s

This commit is contained in:
2026-10-31 08:10:05 -06:00
parent 17c1ba10f7
commit 6770150b11
19 changed files with 580 additions and 51 deletions
+39
View File
@@ -117,6 +117,45 @@ esac'
not_called yay
}
@test "install_packages leaves out packages in skip-packages" {
export INSTALLED="" AS_DEPS=""
stub_pacman
mkdir -p "$HOME/.config/coredesktop"
printf '# Not on this machine\nlibreoffice-fresh\n\n gimp \n' > "$HOME/.config/coredesktop/skip-packages"
source "$REPO/utils.sh"
run install_packages git libreoffice-fresh gimp tmux
[ "$status" -eq 0 ]
called yay -S --noconfirm --answerdiff=None --answeredit=None --answerclean=None git tmux
}
@test "install_packages does nothing when every package is skipped" {
export INSTALLED="" AS_DEPS=""
stub_pacman
mkdir -p "$HOME/.config/coredesktop"
printf 'gimp\n' > "$HOME/.config/coredesktop/skip-packages"
source "$REPO/utils.sh"
run install_packages gimp
[ "$status" -eq 0 ]
# pacman -Qdq with no names would mark every dependency explicit
not_called pacman
not_called yay
}
@test "install-flatpaks.sh leaves out Flatpaks in skip-packages" {
mkdir -p "$HOME/.local/share" "$HOME/.config/coredesktop"
ln -s "$REPO" "$HOME/.local/share/coredesktop"
printf 'us.zoom.Zoom\n' > "$HOME/.config/coredesktop/skip-packages"
stub flatpak 'exit 1'
stub sudo
run bash "$REPO/install-flatpaks.sh"
[ "$status" -eq 0 ]
called sudo flatpak install --system --noninteractive org.mozilla.firefox
! grep -q 'us.zoom.Zoom' <(grep '^sudo' "$STUB_LOG")
}
@test "remove_packages removes only exact matches, not providers" {
# herdr-bin provides herdr, so pacman -Qq herdr prints herdr-bin
stub pacman '