Test Format
Test Discovery
The pipeline delegates test discovery to each repository’s own test runner.
It calls ci/run_tests_k8s.sh --has-tests with the component names from the
snapshot and reads true/false from stdout to determine whether any
component has K8s tests defined. This keeps test file location knowledge
in the repository that owns the tests, not in the pipeline.
The actual tests-k8s.yml format is opaque to the pipeline — it is passed
to the repository’s test runner script, which defines the structure and
semantics. See the respective repository documentation for the YAML format.
Environment Variables
The test runner receives these variables from the pipeline:
| Variable | Description |
|---|---|
TEST_IMAGE |
Container image under test (with digest) |
TEST_GROUP |
Image group name (e.g., git, postgresql) |
TEST_VARIANT |
Variant being tested (e.g., default, builder) |
KUBECONFIG |
Path to kubeconfig for the ephemeral namespace |
TEST_IMAGES |
Bash associative array of all images in the snapshot |
TEST_IMAGES_PATH |
Path to source TEST_IMAGES in external scripts |
TEST_RUN_ID |
Unique ID for this test run (for resource naming) |
TEST_RUN_LABEL |
Label selector for cleanup (e.g., hum-k8s-test=<id>) |
test_fail |
Shell function — call test_fail "message" to fail a test |
Pipeline Parameters
| Parameter | Description | Default |
|---|---|---|
SNAPSHOT |
Konflux snapshot JSON or snapshot name (with snapshot-param-as-name annotation) |
— |
EXTRA_SINGLE_COMPONENT_ARGS |
Additional arguments appended to the test runner for single-component (PR) snapshots | --include-reverse-deps |
Group Snapshot Handling
For group snapshots (post-merge), the pipeline exports:
IMAGE_NAMES— space-separated list of all component namesIMAGE_URL_<COMPONENT>— image URL for each component (name uppercased, dashes replaced with underscores)
The test runner script is called once with multiple --group-component-name
arguments. Test discovery checks all components for tests-k8s.yml. Source is
fetched from the first component’s build attestation (shared source tree).