From 6ff778c85794dfae075cd04aeaa018a1bdb11ce7 Mon Sep 17 00:00:00 2001 From: Tai Groot Date: Sun, 1 Mar 2026 07:32:55 +0000 Subject: [PATCH] fix(test): use non-installed package in dpkg/rpm Install_Unsupported tests The tests expected Install("tree") to error because dpkg/rpm need a .deb/.rpm file path. But "tree" is pre-installed in CI containers, so the code short-circuits to "unchanged" and returns nil. Use a non-existent package name instead to exercise the actual install failure path. --- dpkg/dpkg_integration_test.go | 2 +- rpm/rpm_integration_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dpkg/dpkg_integration_test.go b/dpkg/dpkg_integration_test.go index f4474ab..327459f 100644 --- a/dpkg/dpkg_integration_test.go +++ b/dpkg/dpkg_integration_test.go @@ -164,7 +164,7 @@ func TestIntegration_Dpkg(t *testing.T) { t.Run("Install_Unsupported", func(t *testing.T) { // dpkg install requires a .deb file path, not a package name // This should fail gracefully - _, err := mgr.Install(ctx, snack.Targets("tree")) + _, err := mgr.Install(ctx, snack.Targets("nonexistent-pkg-xyzzy")) assert.Error(t, err) }) diff --git a/rpm/rpm_integration_test.go b/rpm/rpm_integration_test.go index f273cff..e0843ee 100644 --- a/rpm/rpm_integration_test.go +++ b/rpm/rpm_integration_test.go @@ -156,7 +156,7 @@ func TestIntegration_RPM(t *testing.T) { // --- Operations rpm doesn't support --- t.Run("Install_Unsupported", func(t *testing.T) { - _, err := mgr.Install(ctx, snack.Targets("tree")) + _, err := mgr.Install(ctx, snack.Targets("nonexistent-pkg-xyzzy")) assert.Error(t, err) })