Merge lp:~canonical-platform-qa/snappy-ecosystem-tests/fix-list-registered-debug into lp:snappy-ecosystem-tests

Proposed by Omer Akram
Status: Merged
Approved by: Omer Akram
Approved revision: 55
Merged at revision: 52
Proposed branch: lp:~canonical-platform-qa/snappy-ecosystem-tests/fix-list-registered-debug
Merge into: lp:snappy-ecosystem-tests
Diff against target: 22 lines (+9/-2)
1 file modified
snappy_ecosystem_tests/helpers/snapcraft/client.py (+9/-2)
To merge this branch: bzr merge lp:~canonical-platform-qa/snappy-ecosystem-tests/fix-list-registered-debug
Reviewer Review Type Date Requested Status
Heber Parrucci (community) Approve
platform-qa-bot continuous-integration Approve
Review via email: mp+321467@code.launchpad.net

Commit message

list_registered: fix debug logic

Description of the change

list_registered: fix debug logic

To post a comment you must log in.
Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Omer Akram (om26er) wrote :

test results: https://platform-qa-jenkins.ubuntu.com/job/run_snappy_ecosystem_tests/124/artifact/snappy-ecosystem-tests/snappy-ecosystem-results.xml/*view*/

Note the two failing tests are irrelevant here and are being looked into right now.

55. By Omer Akram

pylint happy happy

Revision history for this message
Omer Akram (om26er) wrote :

Actually one of the failure is regarding chromedriver, for that I need to know what packages need to be installed in the slave. So there really is a single failure, which is unrelated.

Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Heber Parrucci (heber013) wrote :

LGTM

review: Approve
Revision history for this message
Omer Akram (om26er) wrote :

Great, lets land it then.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'snappy_ecosystem_tests/helpers/snapcraft/client.py'
2--- snappy_ecosystem_tests/helpers/snapcraft/client.py 2017-03-17 10:28:21 +0000
3+++ snappy_ecosystem_tests/helpers/snapcraft/client.py 2017-03-30 16:50:37 +0000
4@@ -188,9 +188,16 @@
5 if raw:
6 return registered_snaps_output
7 else:
8+ def discard_debug_lines(output_lines):
9+ """Only return non-debug lines."""
10+ for index, line in enumerate(output_lines):
11+ if 'Name' and 'Since' in line:
12+ return output_lines[index:]
13 snaps = registered_snaps_output.splitlines()
14- # if debug is set, the first 3 lines of output are the API calls
15- return parse_snaps_raw(snaps if debug is False else snaps[3:])
16+ # if debug is set, the first few lines of output are the API calls,
17+ # lets discard them.
18+ return parse_snaps_raw(
19+ discard_debug_lines(snaps) if debug else snaps)
20
21 def filter_snaps(self, **predicates):
22 """

Subscribers

People subscribed via source and target branches