Documentation
¶
Overview ¶
Package packagestest builds, for the tests, what package packages lays and reads: the packages of the vectors of spec's format, their archives, an index of them and a release of modules that serves them, and a folder laid from them, read as serve reads it (R41). The tests run without the network.
Index ¶
- func Archive(t testing.TB, files map[string][]byte, extra ...TarEntry) []byte
- func ArchiveName(d formatv0.Digest) string
- func Built(t testing.TB, name string, version ...string) *modulepackage.Package
- func DigestOf(data []byte) formatv0.Digest
- func Index(t testing.TB, entries ...Entry) []byte
- func Set(t testing.TB, entries ...Entry) *packages.Set
- func TarGz(t testing.TB, entries []TarEntry) []byte
- type Entry
- type Release
- type TarEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Archive ¶
Archive is a package's archive as a release of modules gives it: its files, flat, and whatever extra a test adds.
func ArchiveName ¶
ArchiveName is the name of the archive of the package of d in its release.
func Built ¶
Built is the package of the vector name of spec's format, which module-kit builds from its module (format/vectors/packages/); with version, the same module at that version, for a module with two.
Types ¶
type Entry ¶
type Entry struct {
Pkg *modulepackage.Package
ID string
Version string
Format string
Digest formatv0.Digest
Release string
Withdrawn string
}
Entry is an entry of a test's index: of a package built, or of a package that is not there — one of a format api does not read — by its fields.
type Release ¶
type Release struct {
// contains filtered or unexported fields
}
Release is the files of the releases of modules a test serves, by release and name, and what the server was asked for.