Feature #2684
closed
add gerrit tests to osmo-python-tests
Added by msuraev over 6 years ago.
Updated over 6 years ago.
Description
The scripts in osmopy module are used both as an examples to illustrate the use of ctrl protocol and as part of out test/build infrastructure. Some of it are python2, some are python3.
We should add test suite and execute it for every gerrit patch the same way we do for other repos. This is somewhat simplified with the recent addition of twisted_ipa.py which can act both as a ctrl client as well as server to cross-test scripts against each other.
if you have a test in mind and time to work on it, then feel free to add it. However, there is a variety of scripts in there. If we test only one or two scripts in it, and jenkins gives its V+1 to that, that V+1 would not reflect whether everything passes. Having proper coverage is not a small task. But indeed that shouldn't stop us from starting at least some coverage. So far it's still up to us verifying our changes in the field and adding a V+1 vote.
Having some coverage is definitely better than nothing. In addition to cross-checking twisted_ipa against osmo_ctrl we can also use pyflakes for basic syntax checks.
- Related to Feature #2550: example on how to periodically dump KPI/counter to CSV file added
The very basic tests would be package build and install:
python2: gerrit 5277
python3: gerrit 5281
- Status changed from New to In Progress
- Assignee set to msuraev
- % Done changed from 0 to 10
- % Done changed from 10 to 60
The proper fix to ensure tests are failing on syntax errors is available in gerrit 5481.
We now have basic tests which cover osmopy module itself for both python 2 and 3. The tests are rather rudimentary though.
The scripts are not tested yet as part of jenkins check.
Py3 test for osmopy module and osmo_ctrl.py script available in gerrit 5028.
- Status changed from Stalled to Resolved
- % Done changed from 60 to 100
Tests were merged and now used for every commit in jenkins.
Also available in: Atom
PDF