[quality] test: unit coverage for offline_boot_steps.py, sudo_rs_steps.py, bctl_steps.py, update_failure_steps.py - #768
Open
kubestellar-hive[bot] wants to merge 1 commit into
Conversation
Adds pytest unit coverage for the four behave step modules in this repo that had no corresponding tests/unit/ file: - tests/smoke/features/steps/offline_boot_steps.py - tests/smoke/features/steps/sudo_rs_steps.py - tests/developer/features/steps/bctl_steps.py - tests/lifecycle/features/steps/update_failure_steps.py Each new test file stubs behave, dogtail, qecore and the SSH transport in sys.modules so no VM or desktop session is required, following the existing tests/unit/test_xwayland_steps.py and test_lifecycle_steps.py pattern. Line coverage for the four modules goes from 0% to 99%. Co-authored-by: Copilot <[email protected]> Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Aug 29, 2026
hanthor
approved these changes
Sep 2, 2026
hanthor
left a comment
Member
There was a problem hiding this comment.
83 tests across 4 new files for previously-uncovered step modules; spot-checked against real assertion text, exercises real branches. CI green (1407 passed).
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 pytest unit coverage for the four behave step modules in this repo that had no
tests/unit/counterpart. Claimed ground, exactly:tests/unit/test_offline_boot_steps.pytests/smoke/features/steps/offline_boot_steps.py_run_host,nm_wait_online_not_before_graphical,uupd_timer_enabled_or_absent,no_uupd_error_journal_entries,drop_default_route,restore_default_route,boot_with_interfaces_downtests/unit/test_sudo_rs_steps.pytests/smoke/features/steps/sudo_rs_steps.pysudo_is_setuid_root_4755,sudo_n_id_u_returns_0,sudo_preserve_env_check,sudo_pam_includes_system_auth,sudoedit_binary_checktests/unit/test_bctl_steps.pytests/developer/features/steps/bctl_steps.py_terminal_widget,_terminal_delta,_wait_for_command_result,run_bctl_command_in_ptyxis,bctl_command_output_includes,bctl_command_exits_with_status_zero,bctl_update_check_exits_with_status_zero_or_onetests/unit/test_update_failure_steps.pytests/lifecycle/features/steps/update_failure_steps.py_parse_bootc_status,_skip,bootc_rollback_matches_original,force_bootc_rollback_and_reboot, and the four @pending greenboot/corrupted-digest stubs83 new tests. Line coverage for those four modules: 0% -> 99% (only the reboot-disconnect
exceptbody is unreached).Each test file stubs
behave,dogtail.rawinput,qecore.common_stepsandtests.shared.ssh_stepsinsys.modules, following the existingtests/unit/test_xwayland_steps.pyandtests/unit/test_lifecycle_steps.pyimport-helper pattern. No VM, SSH transport or desktop session is required.Scope / disjointness
Test-only change. Adds four new files, modifies nothing. No
Justfile, workflow or production-code edits — pytest already auto-discoverstests/unit/.Verified disjoint from every open testsuite PR:
tests/unit/test_generate_skill_index.py,tests/unit/test_update_coverage_snapshot.py— different files, different modules.tests/unit/test_screenshot_steps.py(tests/shared/screenshot_steps.py) — different module.tests/unit/test_suite_environment_contract.py— different module.Verification
Full existing suite still green — the
sys.modulesstubbing does not leak into other unit tests.Related Issue
Refs #767 (CI gate script coverage tracker) — this PR covers behave step modules, not the CI gate scripts, so the tracker stays open.
Filed by quality agent (hold-gated mode). Human review required. Do not merge without review;
holdlabel must stay.— hive: agent=quality backend=copilot model=claude-opus-5