aboutsummaryrefslogtreecommitdiffsponsor
path: root/removepkg_integration_test.go
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2022-05-19 15:39:24 -0500
committerSlack Coder <slackcoder@server.ky>2022-05-20 15:06:50 -0500
commita1e7249e712bfc7bbcf6275bdd87f2343d60f81a (patch)
treea8827ba2b8701640bfdb4cbe6f148ad5055147cd /removepkg_integration_test.go
parent3026d40715e2758bc9ddfbd98acb558cfcba3c5d (diff)
downloadpkgtools-go-a1e7249e712bfc7bbcf6275bdd87f2343d60f81a.tar.xz
bail out on unknown package attributes
Be freindlier to the user by clearly communicating and refusing to install packages we do not know how to install. Add an environment variable allowing users to opt out and silently ignore errors if they so choose.
Diffstat (limited to 'removepkg_integration_test.go')
-rw-r--r--removepkg_integration_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/removepkg_integration_test.go b/removepkg_integration_test.go
index 15801bd..5048914 100644
--- a/removepkg_integration_test.go
+++ b/removepkg_integration_test.go
@@ -76,16 +76,16 @@ func TestInstallAll(t *testing.T) {
from := os.Getenv("SOURCE")
pkgs, err := findSlackwarePackages(from)
require.NoError(t, err)
+ require.NotEmpty(t, pkgs, "expected some Slackware packages to test installation")
require.NotEmpty(t, os.Getenv("ROOT"), "expected ROOT environment variable to be set")
root := os.Getenv("ROOT")
require.NotEqual(t, "/", root, "a test directory should be used for ROOT. All files there will be deleted")
- _ = os.RemoveAll(root)
-
installFlags := DefaultInstallPkgFlags
installFlags.chmod = false
installFlags.chown = false
+ installFlags.Strict = true
installFlags.SetEnvValues()
removeFlags := DefaultRemovePkgFlags