tests: Add a custom script for getting info about Stratis pools#522
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #522 +/- ##
==========================================
- Coverage 16.54% 10.72% -5.83%
==========================================
Files 2 8 +6
Lines 284 1949 +1665
Branches 79 0 -79
==========================================
+ Hits 47 209 +162
- Misses 237 1740 +1503
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:
|
d2b9b99 to
5bcaee2
Compare
|
|
||
| # Write extra requirements for running pylint here: | ||
| pytest | ||
| PyGObject |
There was a problem hiding this comment.
I am not sure if this is the best place for this "dependency", but pylint is complaining about import error on the import gi line. This is dependency of blivet so it is available on systems with the role (and the test suite) running, but not for the pylint run.
There was a problem hiding this comment.
The network role also uses import gi and pylint tests pass there.
There was a problem hiding this comment.
Network role uses it in a try-except block so I guess pylint is OK with that. Anyway installing PyGObject from pypi doesn't work, it's a C extension and it fails to compile. I think skipping the warning is probably the best way to "fix" this?
17f3775 to
71d871c
Compare
|
to fix the pylint issue: try:
import gi
gi.require_version("GLib", "2.0")
gi.require_version("Gio", "2.0")
from gi.repository import GLib, Gio
except ImportError:
GLib = None
class GioObj(object): pass
Gio = GioObj()
Gio.DBusCallFlags = GioObj()
Gio.DBusCallFlags.NONE = None |
71d871c to
64dbeb8
Compare
There are multiple versions of Stratis in systems we support and it is hard to get all the information to verify test results from the Stratis cmdline utility in a consistent way. This adds a small Python script that uses Stratis DBus API to get the information we need for the tests.
0ef1c4c to
0124d39
Compare
|
Marking as ready for review, |
|
[citest] |
There are multiple versions of Stratis in systems we support and it is hard to get all the information to verify test results from the Stratis cmdline utility in a consistent way. This adds a small Python script that uses Stratis DBus API to get the information we need for the tests.