Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectTestDefinitions ¶
CollectTestDefinitions finds test YAML files in a rendered dist directory's tests/ subfolder. Only top-level files are included (subdirectories are skipped).
func ReportFileName ¶
ReportFileName returns a JUnit report file path for the given image tag, replacing colons with hyphens to produce a valid file name.
Types ¶
type TestRunner ¶
type TestRunner struct {
TestDefinitionPaths []string
Image string
Platform string
ReportFile string
DockerClient *docker.Client
}
TestRunner executes container structure tests against a Docker image and produces JUnit reports.
func NewRunner ¶
func NewRunner(platform string) (*TestRunner, error)
NewRunner creates a TestRunner with a Docker client for the given platform.
func (*TestRunner) Close ¶
func (t *TestRunner) Close() error
Close releases the Docker client resources.
func (*TestRunner) Run ¶
func (t *TestRunner) Run(ctx context.Context) error
Run resolves the test image, executes all configured test definitions, and writes a JUnit report.
func (*TestRunner) RunTestsForImage ¶
func (t *TestRunner) RunTestsForImage(ctx context.Context, imageSource string, testDefs []string, reportFile string) error
RunTestsForImage executes container structure tests against the given image source.