mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Move finalizing the id_ssh_key_file based on how other settings are currently defined to a separate private function and extend the tests to accept defining additional expects/allows within the table. This should apply a consistent set of rules where if the user explicitly supplies the key, it will attempt to resolve it based on the expected ssh directory, and will always retain the explicit setting even if it doesn't exist. Where connect_via_ssh is enabled, it will attempt to detect if the default key exists, otherwise it will disable the setting. If the user does not want automatic guesses, they can explicitly disable by setting it to `nil`. Fixes: #1228