test: avoid api requests
This commit is contained in:
parent
7cf1bbd194
commit
60a1d19042
@ -6,6 +6,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/rapidloop/skv"
|
"github.com/rapidloop/skv"
|
||||||
|
|
||||||
|
"code.dumpstack.io/tools/out-of-tree/distro/debian/snapshot"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCache(t *testing.T) {
|
func TestCache(t *testing.T) {
|
||||||
@ -22,11 +24,14 @@ func TestCache(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
image := snapshot.Package{}
|
||||||
|
image.Deb.Hash = "12345"
|
||||||
|
|
||||||
version := "4.17.14-1"
|
version := "4.17.14-1"
|
||||||
|
|
||||||
dk, err := GetDebianKernel(version)
|
dk := DebianKernel{
|
||||||
if err != nil {
|
Version: DebianKernelVersion{Package: version},
|
||||||
t.Fatal(err)
|
Image: image,
|
||||||
}
|
}
|
||||||
|
|
||||||
err = c.Put(dk)
|
err = c.Put(dk)
|
||||||
|
Loading…
Reference in New Issue
Block a user