testimages

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

README

internal/testutil/testimages

Overview

Pins the container images that tests and fixtures start. The package declares two string constants, each a tag plus an OCI image index digest. It has no imports and no executable code.

Interface

  • Postgres — pinned postgres:17-alpine@sha256:... reference [testimages.go:Postgres]
  • SeaweedFS — pinned chrislusf/seaweedfs:4.51@sha256:... reference [testimages.go:SeaweedFS]

Invariants

  • Each constant has the form <image>:<tag>@sha256:<digest> [testimages.go:Postgres]
  • TestDigestCopiesMatch enforces the pins, not code in this package. Every digest reference to a pinned repository in a tracked text file outside vendor/, docs/plans/, and docs/archive/ must equal the constant. A reference with a placeholder digest (..., … or <digest>) must have the constant's tag. docker-compose.yml must hold a copy of Postgres. docker-compose.yml, README.md, and CONTRIBUTING.md must each hold a copy of SeaweedFS [testimages_test.go:TestDigestCopiesMatch]

Side Effects

  • None

Verification

  • Run: go test ./internal/testutil/testimages/... -tags=openstorage_viewcheck -count=1 -race -timeout=30m

Documentation

Overview

Package testimages pins the container images that tests and fixtures pull.

Each pin is an OCI image index digest (all platforms), so every host runs the same bytes even after upstream moves the tag. The tag stays in front of the digest for readability only: Docker resolves by digest and ignores the tag. To bump a pin, resolve the new index digest with `docker buildx imagetools inspect <image>:<tag>` and update docker-compose.yml, README.md and CONTRIBUTING.md to the same digest. TestDigestCopiesMatch fails until every copy matches.

Index

Constants

View Source
const (
	// Postgres is postgres:17-alpine, which was PostgreSQL 17.11 when pinned.
	Postgres = "postgres:17-alpine@sha256:eee6c6e1b0894fa4fe0075eb054af9fd1cf39a35321c2d4110626cfe506411fb"
	// SeaweedFS is chrislusf/seaweedfs:4.51, the self-hosted store of record.
	SeaweedFS = "chrislusf/seaweedfs:4.51@sha256:f7a49e3f3972ebed5be2ed4befa4a0c68eb7bdddba6e692d42729ceb545134b8"
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL