testimage

package
v0.27.0-rc.19 Latest Latest
Warning

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

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

Documentation

Overview

Package testimage gives a test that builds a ShellHub Dockerfile the build arguments the Dockerfile declares without defaults: the versions pinned in versions.env at the repository root, the same file the compose wrapper and CI pass to their builds.

Index

Constants

View Source
const FileName = "versions.env"

FileName is the file at the repository root that pins every build-time version.

Variables

This section is empty.

Functions

func BuildArgs

func BuildArgs(root string) (map[string]*string, error)

BuildArgs reads versions.env from root and returns its KEY=VALUE lines in the form testcontainers takes as build arguments. It returns an error when the file cannot be read or a line is not KEY=VALUE with both sides filled in, so a build never runs with an empty version.

func Root

func Root() (string, error)

Root returns the repository root: the nearest directory at or above the working directory that holds versions.env. It returns an error when the working directory cannot be resolved or no directory above it holds the file, so a test never reads a version from the wrong checkout.

func Version

func Version(root, key string) (string, error)

Version returns the value versions.env under root pins for key. It returns an error when the file cannot be read, has a line that is not KEY=VALUE or has no such key, so a caller never runs a tool at an unpinned version.

Types

This section is empty.

Jump to

Keyboard shortcuts

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