1
0

feat: return complete repo info

This commit is contained in:
2023-05-15 07:41:44 +00:00
parent 0f799b0d5a
commit d089ad4931
2 changed files with 15 additions and 27 deletions

View File

@@ -6,9 +6,9 @@ import (
"github.com/davecgh/go-spew/spew"
)
func TestGetPackageInfo(t *testing.T) {
func TestGetRepo(t *testing.T) {
// existing
infos, err := GetPackageInfo("linux-image-3.8-trunk-amd64",
infos, err := GetRepo("debian", "linux-image-3.8-trunk-amd64",
"amd64", "3.8.2-1~experimental.1")
if err != nil {
t.Fatal(err)
@@ -17,7 +17,7 @@ func TestGetPackageInfo(t *testing.T) {
t.Log(spew.Sdump(infos))
// non-existing
infos, err = GetPackageInfo("meh", "amd64", "meh")
infos, err = GetRepo("debian", "meh", "amd64", "meh")
if err == nil {
t.Fatalf("should not be ok, result: %s", spew.Sdump(infos))
}