Merge lp://qastaging/~louis/charms/precise/nova-compute/lp1313602-multiline-known-hosts into lp://qastaging/~openstack-charmers-archive/charms/trusty/nova-compute/next

Proposed by James Page
Status: Merged
Merged at revision: 66
Proposed branch: lp://qastaging/~louis/charms/precise/nova-compute/lp1313602-multiline-known-hosts
Merge into: lp://qastaging/~openstack-charmers-archive/charms/trusty/nova-compute/next
Diff against target: 178 lines (+88/-34)
2 files modified
hooks/nova_compute_utils.py (+32/-12)
unit_tests/test_nova_compute_utils.py (+56/-22)
To merge this branch: bzr merge lp://qastaging/~louis/charms/precise/nova-compute/lp1313602-multiline-known-hosts
Reviewer Review Type Date Requested Status
James Page Pending
Louis Bouchard Pending
Review via email: mp+223714@code.qastaging.launchpad.net

This proposal supersedes a proposal from 2014-05-06.

Description of the change

Read known_hosts and authorized_keys line by line

To post a comment you must log in.
Revision history for this message
James Page (james-page) wrote : Posted in a previous version of this proposal

make test
Starting tests...
......S.....................................E.....SSS
======================================================================
ERROR: test_import_authorized_keys_prefix (unit_tests.test_nova_compute_utils.NovaComputeUtilsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/mock.py", line 1210, in patched
    return func(*args, **keywargs)
  File "/home/jamespage/src/charms/ssh/nova-compute/unit_tests/test_nova_compute_utils.py", line 229, in test_import_authorized_keys_prefix
    utils.import_authorized_keys(user='foo', prefix='bar')
  File "hooks/nova_compute_utils.py", line 346, in import_authorized_keys
    for index in range(0, int(known_hosts_index)):
ValueError: invalid literal for int() with base 10: 'Zm9vX2tleQo='

Name Stmts Miss Cover Missing
----------------------------------------------------
nova_compute_context 175 51 71% 34-37, 42-43, 61, 65-66, 71, 97, 101, 104, 113, 119-131, 172, 203, 227-229, 241, 256-259, 263-266, 269-272, 293, 322, 326, 330, 333-335, 341-348
nova_compute_hooks 124 11 91% 90-91, 117, 237, 242-243, 249, 253-256
nova_compute_utils 223 120 46% 140-196, 204, 209-212, 247-249, 256, 260-263, 271-279, 283, 292-301, 314-333, 347-353, 359-360, 364-365, 372-379, 384-405, 422-431, 445-446
----------------------------------------------------
TOTAL 522 182 65%
----------------------------------------------------------------------
Ran 53 tests in 1.616s

FAILED (SKIP=4, errors=1)
make: *** [test] Error 1

review: Needs Fixing
Revision history for this message
James Page (james-page) wrote : Posted in a previous version of this proposal

Please can you update the unit testing for this new approach.

Thanks!

Revision history for this message
Louis Bouchard (louis) wrote : Posted in a previous version of this proposal

Fixed unit tests.

review: Needs Resubmitting

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches