dnsmasq seems to have changed to renaming a new file in to the leases
file. As we were watching for modifications to this file, file updates
were being missed, so the "uvt-kvm wait" command was failing to see the
changes and eventually timing out.
Now we additionally watch for renames in to the expected path to pick up
on this (better) style of updating the file.
This is defined to accept a list of calls, not a single call. Presumably
a newer version of mock became stricter about this, or a change in
libvirt meant that an additional call was being made, which caused an
inadvertent change in test behaviour because of the call to
assert_has_calls not following the definition.
Move the insecure test back to the ssh function, so that the ssh
function may conditionally permit secure access if the guest's host key
is available.
This adds an internal exception to pass back to the caller, so that the
caller may provide the user with a more helpful error message or
warning depending on the situation.
Tests updated. Since the test doesn't really care about the "insecure"
testing functionality, it can safely just request insecure mode all the
time and verify that this is what was requested. Then it can be
independent of whether the guest's host key is available.