ci: Execute rest_api_test tests in codeconv#16653
ci: Execute rest_api_test tests in codeconv#16653sergio-costas wants to merge 2 commits intocanonical:masterfrom
Conversation
|
Fri Feb 27 12:15:21 UTC 2026 Failures:Preparing:
Executing:
Restoring:
Skipped tests from snapd-testing-skip
|
|
Or maybe... should we install the package in the tests themselves...? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #16653 +/- ##
==========================================
+ Coverage 77.52% 78.88% +1.35%
==========================================
Files 1359 1358 -1
Lines 187225 187223 -2
Branches 2446 2446
==========================================
+ Hits 145152 147695 +2543
+ Misses 33298 30534 -2764
- Partials 8775 8994 +219
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@olivercalder What do you think? Should I add dbus-x11 in each test, or keep it in the |
3f9178e to
521e994
Compare
|
I moved it to the tests only. |
37e32cf to
8db092d
Compare
d7b2b26 to
434dd8a
Compare
olivercalder
left a comment
There was a problem hiding this comment.
I think we need a solution which works when running unit tests locally via ./run-checks as well as in spread and in GitHub CI. The current approach only works in GitHub CI it seems.
I think this should either be packaging as a dependency of snapd, or at least a build-dep. Or it's something we'll want to demand when running ./run-checks, similar to what we do for clang-format.
@bboozzoo will know better than I do, though :)
|
Then an extra step would be to check in |
The tests in the rest_api_test.go file require dbus-launcher, available in dbus-x11. If that binary isn't available, the tests are skipped. A clear proof of this is the Codeconv checks, which show that the code in rest_api.go isn't being checked, even when there are tests that cover it. This patch fixes this.
434dd8a to
e83eef8
Compare





The tests in the rest_api_test.go file require
dbus-launch, available indbus-x11. If that binary isn't available, the tests are skipped.A clear proof of this are the Codecov checks, which show that the code in rest_api.go isn't being checked, even when there are tests that cover it.
This patch fixes this.
Thanks for helping us make a better snapd!
Have you signed the license agreement and read the contribution guide?