Documentation
¶
Overview ¶
Package support owns the route inventory used by standalone server tests.
Package support holds server-route test data and request helpers shared by independently runnable protocol test packages. Production code must not import this package.
Index ¶
- Constants
- Variables
- func ArtifactoryError(t *testing.T, rec *httptest.ResponseRecorder) (int, string)
- func Basic(user, password string) map[string]string
- func Bearer(token string) map[string]string
- func Do(t *testing.T, h http.Handler, method, path string, headers map[string]string, ...) *httptest.ResponseRecorder
- func DockerHandwrittenRoutes() map[string]bool
- func DockerRoutes() map[string]bool
- func GoRoutes() map[string]bool
- func HelmChart(name, version string) []byte
- func HelmRoutes() map[string]bool
- func MavenRoutes() map[string]bool
- func NPMGeneratedRoutes() map[string]bool
- func NPMPublishBody(name, version string) string
- func NPMRoutes() map[string]bool
- func NPMTarballOf(name, version string) []byte
- func NuGetForm(pkg []byte) string
- func NuGetPDBPackage(id string, pdb []byte) []byte
- func NuGetPackage(id, version, more string) []byte
- func NuGetPortablePDB() []byte
- func NuGetRoutes() map[string]bool
- func NuGetSymbolsPackage(id, version string) []byte
- func NuGetWindowsPDB() []byte
- func PushImage(t *testing.T, db store.Store, blobs blob.Store, c repo.Config, ...)
- func PyPIRoutes() map[string]bool
- func RegistryManifest(note string) string
- func SHA256Digest(body string) string
- func Seed(t *testing.T, db store.Store)
- func SeedHelmCharter(t *testing.T, db store.Store, passwordHash []byte)
- func TerraformBackendKeys(t *testing.T) *crypt.Keyring
- func TerraformBackendRepos() []repo.Config
- func TerraformBackendRoutes() map[string]bool
- func TerraformProviderRepos() []repo.Config
- func TerraformRegistryRepos() []repo.Config
- func TerraformRoutes() map[string]bool
Constants ¶
const RegistryConfig = `{"architecture":"amd64","os":"linux","config":{"Labels":{"team":"matrix"}}}`
Variables ¶
var CheapHash = func() []byte { h, err := auth.HashPasswordWith(TestHash, "pw") if err != nil { panic(err) } return h }()
CheapHash is the hash of the test principals' shared password, "pw".
var RegistryLayer = SHA256Digest("registry layer")
var TestHash = auth.HashParams{MemoryKiB: 64, Time: 1, Threads: 1}
TestHash keeps server-route authentication tests fast under the race detector.
Functions ¶
func ArtifactoryError ¶
func DockerHandwrittenRoutes ¶
DockerHandwrittenRoutes excludes the generated JFrog REST operations.
func DockerRoutes ¶
DockerRoutes is the Docker and OCI server-assembly route inventory. The standalone Docker status and principal tables each cover every route.
func GoRoutes ¶
GoRoutes is the implemented Go module protocol route inventory. The root package retains registration guards while test/server/golang runs status and principal assertions independently.
func HelmRoutes ¶
HelmRoutes is the classic Helm protocol route inventory. Helm OCI routes have their own registry package and test owner.
func MavenRoutes ¶
MavenRoutes is the route inventory asserted by the independent Maven server-assembly package. The item routes are shared with other formats; the two REST routes are Maven-specific.
func NPMGeneratedRoutes ¶
NPMGeneratedRoutes is the subset implemented by generated Artifactory operations. The root stub guard must skip these after their status rows move.
func NPMPublishBody ¶
func NPMRoutes ¶
NPMRoutes names the implemented npm protocol and migration operations. The root registration guards and standalone npm status/matrix suites share this inventory without importing each other's test package.
func NPMTarballOf ¶
func NuGetPDBPackage ¶
func NuGetPackage ¶
func NuGetPortablePDB ¶
func NuGetPortablePDB() []byte
func NuGetRoutes ¶
NuGetRoutes lists the implemented NuGet route patterns. The root package uses this inventory for registration/stub checks; test/server/nuget runs their status and principal assertions independently.
func NuGetSymbolsPackage ¶
func NuGetWindowsPDB ¶
func NuGetWindowsPDB() []byte
func PushImage ¶
func PushImage( t *testing.T, db store.Store, blobs blob.Store, c repo.Config, name, tag, body string, )
PushImage stores RegistryConfig in the image and pushes an OCI manifest to the tag; RegistryLayer must already be present in the image.
func PyPIRoutes ¶
PyPIRoutes is the implemented PyPI protocol inventory. The root server package guards registration; test/server/pypi checks status and principals.
func RegistryManifest ¶
RegistryManifest is the OCI image manifest used by the shared Docker and Helm OCI server-assembly fixtures. note varies its digest.
func SHA256Digest ¶
SHA256Digest is the registry digest of a fixture body.
func SeedHelmCharter ¶
SeedHelmCharter gives the chart-only caller rights on charts but not their provenance sidecars. Root and independent Helm matrices use the same grant.
func TerraformBackendKeys ¶
TerraformBackendKeys is the deterministic keyring for sealed fixture state.
func TerraformBackendRepos ¶
TerraformBackendRepos is the local backend fixture shared with the root cross-format guards.
func TerraformBackendRoutes ¶
TerraformBackendRoutes lists the native remote-state API routes. Generic item and storage routes remain covered by the root cross-format guards.
func TerraformProviderRepos ¶
TerraformProviderRepos supplies the signing-key provider fixture.
func TerraformRegistryRepos ¶
TerraformRegistryRepos are the module registry fixture repositories shared by the root cross-format suite and the standalone Terraform route suite.
func TerraformRoutes ¶
TerraformRoutes is the native module/provider registry and network mirror route inventory. Backend state routes have a separate owner.
Types ¶
This section is empty.