From afc8cc73f6f8a481d375b6bd9da0a551f905fb7c Mon Sep 17 00:00:00 2001 From: gerblesh <101901964+gerblesh@users.noreply.github.com> Date: Wed, 25 Dec 2024 14:47:00 -0800 Subject: [PATCH] fix: use dry-run in unit tests --- drv/brew/brew.go | 1 + drv/brew/brew_test.go | 2 +- drv/distrobox/distrobox_test.go | 2 +- drv/flatpak/flatpak_test.go | 2 +- drv/rpmostree/rpmostree_test.go | 2 +- drv/system/system_test.go | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drv/brew/brew.go b/drv/brew/brew.go index 0fc0e93..ebd97ca 100644 --- a/drv/brew/brew.go +++ b/drv/brew/brew.go @@ -99,6 +99,7 @@ func (up BrewUpdater) New(config UpdaterInitConfiguration) (BrewUpdater, error) uid, err := up.GetBrewUID() if err != nil { + up.Config.Enabled = false return up, err } up.BaseUser = uid diff --git a/drv/brew/brew_test.go b/drv/brew/brew_test.go index d622250..c604e89 100644 --- a/drv/brew/brew_test.go +++ b/drv/brew/brew_test.go @@ -10,7 +10,7 @@ import ( func InitBaseConfig() brew.BrewUpdater { var initConfiguration = generic.UpdaterInitConfiguration{ - DryRun: false, + DryRun: true, Ci: false, Verbose: false, Environment: nil, diff --git a/drv/distrobox/distrobox_test.go b/drv/distrobox/distrobox_test.go index 77d3b27..32539be 100644 --- a/drv/distrobox/distrobox_test.go +++ b/drv/distrobox/distrobox_test.go @@ -12,7 +12,7 @@ import ( func InitBaseConfig() distrobox.DistroboxUpdater { var initConfiguration = generic.UpdaterInitConfiguration{ - DryRun: false, + DryRun: true, Ci: false, Verbose: false, Environment: nil, diff --git a/drv/flatpak/flatpak_test.go b/drv/flatpak/flatpak_test.go index 6974b6f..3f8f9dd 100644 --- a/drv/flatpak/flatpak_test.go +++ b/drv/flatpak/flatpak_test.go @@ -12,7 +12,7 @@ import ( func InitBaseConfig() flatpak.FlatpakUpdater { var initConfiguration = generic.UpdaterInitConfiguration{ - DryRun: false, + DryRun: true, Ci: false, Verbose: false, Environment: nil, diff --git a/drv/rpmostree/rpmostree_test.go b/drv/rpmostree/rpmostree_test.go index 56c1522..9ea3371 100644 --- a/drv/rpmostree/rpmostree_test.go +++ b/drv/rpmostree/rpmostree_test.go @@ -10,7 +10,7 @@ import ( func InitBaseConfig() rpmostree.RpmOstreeUpdater { var initConfiguration = generic.UpdaterInitConfiguration{ - DryRun: false, + DryRun: true, Ci: false, Verbose: false, Environment: nil, diff --git a/drv/system/system_test.go b/drv/system/system_test.go index ce162e0..0b2e795 100644 --- a/drv/system/system_test.go +++ b/drv/system/system_test.go @@ -10,7 +10,7 @@ import ( func InitBaseConfig() system.SystemUpdater { var initConfiguration = generic.UpdaterInitConfiguration{ - DryRun: false, + DryRun: true, Ci: false, Verbose: false, Environment: nil,