On Tue, Jan 19, 2016 at 04:15:08PM +0100, 'Helga Velroyen' via ganeti-devel wrote: > In order to improve the testability of backend.RenewCrypto, > this patch does two things: > * It uses the previously introduced SSH utility functions. > Those are easier to consistently mock during unit tests > and they consistenly abstract the lower layer of file > operations on SSH keys. > * When calling the subfunctions to add and remove keys, > some of the optional parameters were not propagated, > which in tests will prevent the mocks from being > propagated. > > Besides that, it also renames ReadRemoteSshPubKeys to > ReadRemoteSshPubKey, because that actually only fetches one > key. > > Signed-off-by: Helga Velroyen <[email protected]> > --- > lib/backend.py | 59 > +++++++++++---------------- > lib/client/gnt_cluster.py | 8 ++-- > lib/client/gnt_node.py | 6 +-- > lib/ssh.py | 4 +- > test/py/ganeti.client.gnt_cluster_unittest.py | 2 +- > 5 files changed, 34 insertions(+), 45 deletions(-)
LGTM -- Klaus Aehlig Google Germany GmbH, Dienerstr. 12, 80331 Muenchen Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschaeftsfuehrer: Matthew Scott Sucherman, Paul Terence Manicle
