From 60a1d19042ec1cd17a4b7aa96a8ac9144d6a7e1e Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Sat, 13 May 2023 12:02:41 +0000 Subject: [PATCH] test: avoid api requests --- distro/debian/cache_test.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/distro/debian/cache_test.go b/distro/debian/cache_test.go index 88c4d2c..dcc774e 100644 --- a/distro/debian/cache_test.go +++ b/distro/debian/cache_test.go @@ -6,6 +6,8 @@ import ( "testing" "github.com/rapidloop/skv" + + "code.dumpstack.io/tools/out-of-tree/distro/debian/snapshot" ) func TestCache(t *testing.T) { @@ -22,11 +24,14 @@ func TestCache(t *testing.T) { t.Fatal(err) } + image := snapshot.Package{} + image.Deb.Hash = "12345" + version := "4.17.14-1" - dk, err := GetDebianKernel(version) - if err != nil { - t.Fatal(err) + dk := DebianKernel{ + Version: DebianKernelVersion{Package: version}, + Image: image, } err = c.Put(dk)