test: use tmpdir to not interfere with other tests
This commit is contained in:
parent
dc8d667930
commit
5975898225
@ -1,14 +1,24 @@
|
|||||||
package debian
|
package debian
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"code.dumpstack.io/tools/out-of-tree/config"
|
"code.dumpstack.io/tools/out-of-tree/config"
|
||||||
|
"code.dumpstack.io/tools/out-of-tree/fs"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMatchImagePkg(t *testing.T) {
|
func TestMatchImagePkg(t *testing.T) {
|
||||||
t.Log("tested with cache by default")
|
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{
|
km := config.KernelMask{
|
||||||
ReleaseMask: "3.2.0-4",
|
ReleaseMask: "3.2.0-4",
|
||||||
DistroRelease: "7",
|
DistroRelease: "7",
|
||||||
|
Loading…
Reference in New Issue
Block a user