1
0

test: enable match image test

This commit is contained in:
dump_stack() 2023-05-13 11:00:34 +00:00
parent b1b7a9e675
commit 59febd75b0
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -2,30 +2,36 @@ package debian
import ( import (
"testing" "testing"
// "github.com/cavaliergopher/grab/v3"
// "code.dumpstack.io/tools/out-of-tree/config" "github.com/cavaliergopher/grab/v3"
"code.dumpstack.io/tools/out-of-tree/cache"
"code.dumpstack.io/tools/out-of-tree/config"
) )
// func TestMatchImagePkg(t *testing.T) { func TestMatchImagePkg(t *testing.T) {
// km := config.KernelMask{ cache.URL = "https://out-of-tree.fra1.digitaloceanspaces.com/1.0.0/"
// ReleaseMask: "3.2.0-4", t.Log("tested with cache by default")
// DistroRelease: "7",
// }
// resp, err := grab.Get(tmp, fileurl) km := config.KernelMask{
// if err != nil { ReleaseMask: "3.2.0-4",
// t.Fatal(err) DistroRelease: "7",
// } }
// pkgs, err := MatchImagePkg(km) resp, err := grab.Get(tmp, fileurl)
// if err != nil { if err != nil {
// t.Fatal(err) t.Fatal(err)
// } }
// if len(pkgs) == 0 { pkgs, err := MatchImagePkg(km)
// t.Fatal("no packages") if err != nil {
// } t.Fatal(err)
// } }
if len(pkgs) == 0 {
t.Fatal("no packages")
}
}
func TestParseKernelMajorMinor(t *testing.T) { func TestParseKernelMajorMinor(t *testing.T) {
type testcase struct { type testcase struct {