Project

General

Profile

Feature #2684

add gerrit tests to osmo-python-tests

Added by msuraev 10 months ago. Updated 8 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
11/27/2017
Due date:
% Done:

100%

Estimated time:
Spec Reference:

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

Related to OpenBSC - Feature #2550: example on how to periodically dump KPI/counter to CSV fileResolved2017-10-06

History

#1 Updated by neels 10 months 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.

#2 Updated by msuraev 10 months 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.

#3 Updated by msuraev 10 months ago

  • Related to Feature #2550: example on how to periodically dump KPI/counter to CSV file added

#4 Updated by msuraev 10 months ago

The very basic tests would be package build and install:
python2: gerrit 5277
python3: gerrit 5281

#5 Updated by msuraev 10 months ago

  • Status changed from New to In Progress
  • Assignee set to msuraev
  • % Done changed from 0 to 10

#6 Updated by msuraev 9 months ago

  • % Done changed from 10 to 60

The proper fix to ensure tests are failing on syntax errors is available in gerrit 5481.

#7 Updated by msuraev 9 months 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.

#8 Updated by msuraev 9 months ago

  • Checklist item Expand test_py2 set to Done

#9 Updated by msuraev 9 months ago

Py3 test for osmopy module and osmo_ctrl.py script available in gerrit 5028.

#10 Updated by msuraev 8 months ago

  • Checklist item Expand test_py3 set to Done
  • Checklist item Check osmo_* scripts set to Done

#11 Updated by msuraev 8 months ago

  • 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

Add picture from clipboard (Maximum size: 48.8 MB)