Feature #2684
closedadd gerrit tests to osmo-python-tests
100%
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.
Related issues
Updated by neels over 6 years ago
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.
Updated by msuraev over 6 years ago
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.
Updated by msuraev over 6 years ago
- Related to Feature #2550: example on how to periodically dump KPI/counter to CSV file added
Updated by msuraev over 6 years ago
The very basic tests would be package build and install:
python2: gerrit 5277
python3: gerrit 5281
Updated by msuraev over 6 years ago
- Status changed from New to In Progress
- Assignee set to msuraev
- % Done changed from 0 to 10
Updated by msuraev over 6 years ago
- % Done changed from 10 to 60
The proper fix to ensure tests are failing on syntax errors is available in gerrit 5481.
Updated by msuraev over 6 years ago
- Checklist item Expand test_py2 added
- Checklist item Expand test_py3 added
- Checklist item Check osmo_* scripts added
- Status changed from In Progress to Stalled
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.
Updated by msuraev over 6 years ago
Py3 test for osmopy module and osmo_ctrl.py script available in gerrit 5028.
Updated by msuraev over 6 years ago
- Checklist item Expand test_py3 set to Done
- Checklist item Check osmo_* scripts set to Done
Updated by msuraev over 6 years ago
- Status changed from Stalled to Resolved
- % Done changed from 60 to 100
Tests were merged and now used for every commit in jenkins.