Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Mocks omarchy-osd in system power tests to prevent UI side effects while verifying reboot and shutdown OSD arguments.
Changes:
- Adds
omarchy-osdto mocked commands. - Verifies OSD icon, message, and duration.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The test runs the real bin/omarchy-system-reboot and bin/omarchy-system-shutdown, mocking the commands they call so nothing actually happens. omarchy-osd was left out of that list, so running the suite paints "Rebooting" and then "Shutting down" across the screen of whoever is running it, five seconds each. Nothing is at risk — systemd-run is mocked, so no poweroff is ever scheduled — but a test that tells you your machine is shutting down is its own kind of failure. Mock it like the rest, and assert the call while we are here: the icon and message the OSD is asked for are part of what these commands do.
alhasapi
force-pushed
the
test-osd-mock
branch
from
August 28, 2026 15:49
5d0cfb5 to
3fa7d9c
Compare
Member
|
Automated duplication check: this pull request looks similar to #7216, which covers the same power test OSD mock. I keep that one open and close this one to consolidate review. If you feel this is the wrong decision, please open the PR again with a note on the difference. |
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.
The test runs the real
bin/omarchy-system-rebootandbin/omarchy-system-shutdown, mocking the commands they call so nothing actually happens.omarchy-osdwas left out of that list:but
bin/omarchy-system-shutdown:11calls it:omarchy-osd -i shutdown -m "Shutting down" -d 5000So running the suite paints "Rebooting" and then "Shutting down" across the screen of whoever is running it, five seconds each. I hit this on my own machine and went looking for a scheduled poweroff before I found the test.
Nothing is actually at risk —
systemd-runis mocked, so no poweroff is ever scheduled, andomarchy-hyprland-window-close-allis mocked too. But a test that tells you your machine is shutting down is its own kind of failure.This mocks it like the rest, and asserts the call while here: the icon and message the OSD is asked for are part of what these commands do, and nothing covered them before.
All four assertions pass, and the suite no longer touches the screen.