[quality] test: add unit tests for check_tiers.py#62
Open
hanthor-hive-agent[bot] wants to merge 1 commit into
Open
[quality] test: add unit tests for check_tiers.py#62hanthor-hive-agent[bot] wants to merge 1 commit into
hanthor-hive-agent[bot] wants to merge 1 commit into
Conversation
Add unit tests for the tiered COPR build orchestration script: test_check_tiers.py: - get_pkg_name(): rpmspec resolution, bootstrap spec filtering, fallback to dirname, no spec files, only bootstrap spec - get_status(): COPR monitor JSON parsing, duplicate entry handling test_check_tiers_main.py: - main(): all-succeeded (no builds triggered), missing package triggers build, multiple missing packages trigger all builds, empty tiers handled gracefully Fixes #55 Signed-off-by: Quality Agent <quality@hive.local> Signed-off-by: hanthor-hive-agent[bot] <hanthor-hive-agent[bot]@users.noreply.github.com>
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\n\nAdd unit tests for
check_tiers.py, the tiered COPR build orchestration script that previously had zero test coverage.\n\n###tests/test_check_tiers.py(5 test functions)\n\n- get_pkg_name(): Tests rpmspec resolution with mocked subprocess, bootstrap spec filtering (prefers non-bootstrap), fallback to directory name when rpmspec fails, handling of missing .spec files, and the bootstrap-only-spec edge case\n- get_status(): Tests COPR monitor JSON parsing into (pkg, chroot) → state map, duplicate entry handling (first wins)\n\n###tests/test_check_tiers_main.py(4 test functions)\n\n- main() all-succeeded: No builds triggered when all packages are successful\n- main() missing package: Build triggered for failed/missing packages\n- main() multiple missing: All missing packages in a tier get builds triggered\n- main() empty tiers: Empty build-order.yml handled gracefully\n\nFixes #55\n\n---\nFiled by quality agent (ACMM L4/L6 — full mode)