[quality] test: add BATS unit tests for bootc-build/create-manifest/action.yml - #428
Open
kubestellar-hive[bot] wants to merge 1 commit into
Open
[quality] test: add BATS unit tests for bootc-build/create-manifest/action.yml#428kubestellar-hive[bot] wants to merge 1 commit into
kubestellar-hive[bot] wants to merge 1 commit into
Conversation
Adds tests/bats/test_create_manifest.bats covering the four inline run blocks in bootc-build/create-manifest/action.yml: required-tool validation, manifest creation, manifest population, and tag push. podman, buildah and sleep are stubbed on PATH, so no container runtime or registry is needed. The snippets under test are verbatim copies of the action.yml run blocks, matching the existing convention in tests/bats/test_detect_changes.bats. Covered behaviour: - podman/jq presence check fails closed - registry and repository owner are lowercased in manifest references - a failing 'manifest rm' is tolerated; 'manifest create' still runs - digests-json must be a JSON object; each entry becomes a 'manifest add ... --arch <platform>' - entries with a blank digest are skipped - label annotation falls back to buildah when 'podman manifest annotate --index' is unsupported (podman < 5.0 on GitHub runners) - first tag pushes with --digestfile, later tags without - push retries up to 3 attempts before failing - an empty digestfile and an empty tag list are hard errors - the manifest digest is written to GITHUB_OUTPUT Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
This was referenced Aug 28, 2026
hanthor
approved these changes
Sep 2, 2026
hanthor
left a comment
Member
There was a problem hiding this comment.
BATS coverage for bootc-build/create-manifest/action.yml. Verified the embedded snippets match the live file exactly. Tests cover real branches: retry-then-succeed vs. hard-fail-after-3, the buildah fallback path, JSON-shape validation, and a negative assertion against un-lowercased strings. CI green (5/5).
Generated by Claude Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Improvement
Adds
tests/bats/test_create_manifest.bats— 21 BATS cases covering the four inlinerun:blocks inbootc-build/create-manifest/action.yml, which previously had zero test coverage:action.ymlValidate required toolspodman/jqpresence check fails closed with::error::Create manifest${REGISTRY,,}), failingmanifest rmtolerated,manifest createfailure propagatesPopulate manifestdigests-jsonmust be a JSON object; each entry becomesmanifest add ... --arch <platform>; blank digests skipped;manifest addfailure propagatesPopulate manifest(labels)podman manifest annotate --indexpath, and the buildah fallback for podman < 5.0 on GitHub runners; blank label lines skippedPush manifest tags--digestfileand later tags without; blank tag lines skipped; retry succeeds on attempt 3; hard failure after 3 attempts; empty digestfile is a hard error; empty tag list is a hard error;digestwritten toGITHUB_OUTPUTpodman,buildahandsleepare stubbed onPATH, so the suite needs no container runtime, registry, or network. The snippets under test are verbatim copies of theaction.ymlrun blocks (machine-verified), following the existing convention intests/bats/test_detect_changes.bats— the tests break if the action logic changes without updating them.Picked up automatically by the existing
batsjob in.github/workflows/unit-tests.yml(bats tests/bats/). No production code, workflow, or docs files are touched.Verification
Claimed ground / overlap check
Claims exactly one new file:
tests/bats/test_create_manifest.bats, testingbootc-build/create-manifest/action.yml.Checked against every open hold-gated PR:
actions#427touchesbootc-build/scan-image/action.yml,tests/bats/test_scan_image.bats, anddocs/skills/*.md— disjoint files, disjoint action.actions#426touches.github/workflows/pkg-cadence.yml— disjoint.bluefin-lts#545concerns NVIDIA manifest assembly in the bluefin-lts repo workflows, not this composite action.bootc-build/create-manifest/ortests/bats/.Deliberately does not edit
docs/skills/testing.md, whichactions#427is modifying.Filed by quality agent (hold-gated mode). Human review required — do not merge without review.
— hive: agent=quality backend=copilot model=claude-opus-5