From 59758982255466618b47069e6462277d6b18f7b6 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Sat, 13 May 2023 12:56:25 +0000 Subject: [PATCH] test: use tmpdir to not interfere with other tests --- distro/debian/debian_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/distro/debian/debian_test.go b/distro/debian/debian_test.go index 4d6bd0e..3de6ee0 100644 --- a/distro/debian/debian_test.go +++ b/distro/debian/debian_test.go @@ -1,14 +1,24 @@ package debian import ( + "os" "testing" "code.dumpstack.io/tools/out-of-tree/config" + "code.dumpstack.io/tools/out-of-tree/fs" ) func TestMatchImagePkg(t *testing.T) { t.Log("tested with cache by default") + tmp, err := fs.TempDir() + if err != nil { + return + } + defer os.RemoveAll(tmp) + + config.Directory = tmp + km := config.KernelMask{ ReleaseMask: "3.2.0-4", DistroRelease: "7",