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.
This commit is contained in:
2026-03-01 07:32:55 +00:00
parent f85e215981
commit 6ff778c857
2 changed files with 2 additions and 2 deletions

View File

@@ -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)
})

View File

@@ -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)
})