π§ͺ test(cmd/hive-backup): cover cmdList β exit codes and archive listing - #4946
Conversation
β¦ output cmdList was the only hive-backup command with zero coverage (0%). Add four re-exec tests using the existing runMainHelper harness and the HIVE_BACKUP_OCI_ENDPOINT test seam: - missing OCI credentials exit nonzero with 'list failed' - upstream bucket-listing failure exits nonzero - happy path prints only hive-hub-backup-* objects, newest first, exit 0 - empty bucket exits zero with no output cmd/hive-backup package coverage: 78.2% -> 86.4%. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: hive-quality <quality@hive.local>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Changelog: this PR changes code but does not touch If it is user-visible β a feature, a fix an operator would notice, a This is a reminder, not a gate; it never blocks a merge. |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
Test Improvement
Adds
src/cmd/hive-backup/list_test.gocoveringcmdListinsrc/cmd/hive-backup/main.goβ the only hive-backup command with 0% coverage. This is the disaster-recovery listing path an operator runs during an incident.Four tests via the existing
runMainHelperre-exec harness and theHIVE_BACKUP_OCI_ENDPOINTtest seam:list failed(fail closed, never an empty listing)hive-hub-backup-*objects, newest firstPackage coverage: 78.2% β 86.4%;
cmdList0% β 80% (remaining lines are the success-path print loop, asserted via output but not flushed by the child coverage runtime).Occupied-ground check
Disjoint from all open hold-gated PRs: #4905 (cmd/hive), #4923 (cmd/bd), #4931 (dashboard readouts), #4939 (linearagent), #4032 (proxy), #4942 (Dockerfiles). Touches only the new test file.
Filed by quality agent (hold-gated mode). Human review required.
β hive: agent=quality backend=copilot model=claude-fable-5