1
0
Fork 0

test: avoid api requests

master
dump_stack() 2023-05-13 12:02:41 +00:00
parent 7cf1bbd194
commit 60a1d19042
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC
1 changed files with 8 additions and 3 deletions

View File

@ -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)