Project

General

Profile

Actions

Feature #2684

closed

add gerrit tests to osmo-python-tests

Added by msuraev over 6 years ago. Updated about 6 years ago.

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

100%

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.


Checklist

  • Expand test_py2
  • Expand test_py3
  • Check osmo_* scripts

Related issues

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

Actions
Actions #1

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.

Actions #2

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.

Actions #3

Updated by msuraev over 6 years ago

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

Updated by msuraev over 6 years ago

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

Actions #5

Updated by msuraev over 6 years ago

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

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.

Actions #7

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.

Actions #8

Updated by msuraev about 6 years ago

  • Checklist item Expand test_py2 set to Done
Actions #9

Updated by msuraev about 6 years ago

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

Actions #10

Updated by msuraev about 6 years ago

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

Updated by msuraev about 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.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)