1
0
out-of-tree/distro/debian/snapshot/snapshot_test.go
2023-05-11 22:35:38 +00:00

35 lines
599 B
Go

package snapshot
import (
"errors"
"testing"
)
func TestSourcePackageVersions(t *testing.T) {
versions, err := SourcePackageVersions("linux")
if err != nil {
t.Fatal(err)
}
if len(versions) == 0 {
t.Fatal(errors.New("empty response"))
}
t.Logf("found %d package versions", len(versions))
}
func TestPackages(t *testing.T) {
packages, err := Packages("linux", "3.16.5-1", "amd64",
`^linux-(image|headers)-[0-9\.\-]*-(amd64|amd64-unsigned)$`,
[]string{})
if err != nil {
t.Fatal(err)
}
if len(packages) == 0 {
t.Fatal(errors.New("empty response"))
}
t.Log(packages)
}