Skip to content

test: verify zbus::Error to AppError conversion#82

Merged
jotuel merged 1 commit intov0.3.12from
test-app-error-3125849291498438236
Feb 21, 2026
Merged

test: verify zbus::Error to AppError conversion#82
jotuel merged 1 commit intov0.3.12from
test-app-error-3125849291498438236

Conversation

@google-labs-jules
Copy link
Contributor

Added unit tests to src/app/error.rs to verify the conversion from zbus::Error to AppError.

  • Validated all specific error mappings (PermissionDenied, AlreadyInUse, etc.).
  • Verified fallback behavior for unknown errors and other zbus::Error variants.
  • Verified that AppError derives PartialEq allowing direct assertions.
  • Used a helper to construct zbus::Error::MethodError correctly for the used zbus version (5.13.2).

PR created automatically by Jules for task 3125849291498438236 started by @jotuel

This commit introduces a new `tests` module in `src/app/error.rs` to verify the `From<zbus::Error>` implementation for `AppError`.

It includes:
- A helper function `create_method_error` to construct `zbus::Error::MethodError` with a dummy D-Bus message.
- Test cases for all mapped `net.reactivated.Fprint.Error.*` strings.
- Test cases for unknown errors and non-MethodError variants to ensure correct fallback to `AppError::Unknown`.

This improves test coverage for critical error handling logic.
@google-labs-jules
Copy link
Contributor Author

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@jotuel jotuel changed the base branch from main to v0.3.12 February 21, 2026 18:15
@jotuel jotuel merged commit adef899 into v0.3.12 Feb 21, 2026
1 check failed
@jotuel jotuel deleted the test-app-error-3125849291498438236 branch February 21, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant