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.
The vectors of packages hold no answer slot bound choice, so the package holds modules of its own too, synthetic, under modules/: choices, whose tasks a tap checks, with one that AI would read and one with a rubric.
Index ¶
- func Archive(t testing.TB, files map[string][]byte, extra ...TarEntry) []byte
- func ArchiveName(d formatv0.Digest) string
- func As(id, ages string) func(path string, data []byte) []byte
- 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 Own(t testing.TB, name string, version ...string) *modulepackage.Package
- func OwnEdited(t testing.TB, name, version string, edit func(path string, data []byte) []byte) *modulepackage.Package
- 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 As ¶ added in v0.1.26
As is an edit for OwnEdited: the manifest names the module id, for the age categories ages, a list as YAML writes it, "[adult]" — another module of the same graph.
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.
func Own ¶ added in v0.1.15
Own is the package of this package's own module name, under modules/; with version, the same module at that version.
func OwnEdited ¶ added in v0.1.18
func OwnEdited(t testing.TB, name, version string, edit func(path string, data []byte) []byte) *modulepackage.Package
OwnEdited is the package of this package's own module name at version, with each of its files as edit gives it back: a later version that changes the module, as one with retired skills.
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.