-
Notifications
You must be signed in to change notification settings - Fork 0
feat(ydotool): Add comprehensive unit tests for ydotool injector #273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This commit introduces a full suite of unit tests for the `ydotool_injector.rs` module. - A `TestHarness` is implemented to create an isolated test environment, mocking the filesystem, environment variables, and external binaries (`ydotool`, `which`). - The core `ydotool_injector.rs` logic was made testable by introducing a `UINPUT_PATH_OVERRIDE` environment variable under a `cfg(test)` flag to avoid permission issues with `/dev/uinput` during tests. - Tests cover: - Socket path discovery logic. - Binary permission and availability checks. - `inject_text` functionality, including the fallback from 'paste' to 'type' mode. These tests improve the reliability and maintainability of the ydotool injection backend.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
qodo-code-review
bot
commented
Dec 3, 2025
•
edited by qodo-free-for-open-source-projects
bot
Loading
edited by qodo-free-for-open-source-projects
bot
CI Feedback 🧐(Feedback updated until commit 1efe36c)A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
Rebased from Jules draft #273. - Add TestHarness for controlled test environment - Add tests for socket discovery, binary permissions, text injection - Gate tests behind ydotool feature flag
|
Superseded by #311 (rebased and integrated) |
Understood. Acknowledging that this work is now obsolete and stopping work on this task. |
Rebased from Jules draft #273. - Add TestHarness for controlled test environment - Add tests for socket discovery, binary permissions, text injection - Gate tests behind ydotool feature flag
This change adds a comprehensive suite of unit tests for the ydotool_injector.rs module. It introduces a
TestHarnessto create an isolated test environment, mocking the filesystem, environment variables, and external binaries. The ydotool_injector.rs logic was made testable by introducing aUINPUT_PATH_OVERRIDEenvironment variable to avoid permission issues with /dev/uinput during tests. The tests cover socket path discovery logic, binary permission and availability checks, and inject_text functionality, including the fallback from 'paste' to 'type' mode.Fixes #265
PR created automatically by Jules for task 18412184917474101525 started by @Coldaine