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
=== modified file 'snappy_ecosystem_tests/helpers/snapcraft/client.py'
--- snappy_ecosystem_tests/helpers/snapcraft/client.py 2017-03-17 10:28:21 +0000
+++ snappy_ecosystem_tests/helpers/snapcraft/client.py 2017-03-30 16:50:37 +0000
@@ -188,9 +188,16 @@
188 if raw:188 if raw:
189 return registered_snaps_output189 return registered_snaps_output
190 else:190 else:
191 def discard_debug_lines(output_lines):
192 """Only return non-debug lines."""
193 for index, line in enumerate(output_lines):
194 if 'Name' and 'Since' in line:
195 return output_lines[index:]
191 snaps = registered_snaps_output.splitlines()196 snaps = registered_snaps_output.splitlines()
192 # if debug is set, the first 3 lines of output are the API calls197 # if debug is set, the first few lines of output are the API calls,
193 return parse_snaps_raw(snaps if debug is False else snaps[3:])198 # lets discard them.
199 return parse_snaps_raw(
200 discard_debug_lines(snaps) if debug else snaps)
194201
195 def filter_snaps(self, **predicates):202 def filter_snaps(self, **predicates):
196 """203 """

Subscribers

People subscribed via source and target branches