Skip to content

Run tests without depending on the host at all#441

Merged
bilelmoussaoui merged 12 commits intomainfrom
bilelmoussaoui/helpers-tests
Mar 29, 2026
Merged

Run tests without depending on the host at all#441
bilelmoussaoui merged 12 commits intomainfrom
bilelmoussaoui/helpers-tests

Conversation

@bilelmoussaoui
Copy link
Copy Markdown
Collaborator

Add various helper methods to no longer go through XDG_DATA_HOME or connect to the session bus. The client tests are now using a oo7-server lib crate that should never be published, but only used for tests. By doing so, we can run all the dbus client tests, particularly the ones requiring prompting.

This makes the tests run much faster as they no longer need to be run serially.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 29, 2026

📊 Code Coverage Report

Metric Value
Current PR Coverage 87.48%
Main Branch Coverage 85.72%
Coverage Change 📈 +1.76%

🎉 Great: Coverage increased by more than 1%!

Coverage report generated by cargo-tarpaulin

@bilelmoussaoui
Copy link
Copy Markdown
Collaborator Author

The clippy warning failure is because the exported library types are not used by anything, we can silence them but that means any unused types when doing a binary build wouldn't be detected. I guess we can have a cargo clippy for the binary only and not run it for the library build...

@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/helpers-tests branch 2 times, most recently from ceb1181 to d080354 Compare March 29, 2026 20:51
Handles the plain/encrypted part internally simplifying some of the tests a bit.
By adding helper methods that would use the passed tmpdir for tests
ensuring isolated test runs without having to run the tests serially.
By using an internal override that simplifies everything, remove few
unsafe usages, drop serial_test and make test less racy.
Avoids any dependency on the host and making sure we never affect the
user keyrings.
as it timeouts out often on coverage tests
Except for python bindings, till we replace that with oo7-daemon eventually.
@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/helpers-tests branch from d080354 to f7e3899 Compare March 29, 2026 20:51
@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/helpers-tests branch from f7e3899 to dbb40ed Compare March 29, 2026 20:55
@bilelmoussaoui bilelmoussaoui merged commit 89c5557 into main Mar 29, 2026
17 checks passed
@bilelmoussaoui bilelmoussaoui deleted the bilelmoussaoui/helpers-tests branch March 29, 2026 21:27
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