Fixes handling of default of --key in connect plugin
When not specified, the default value might be a list, which wasn't true
in the past - thanks to `StepData` and its handling of default values,
`get()` now may return a list or a string, depending on whether `--key`
was given.
@@ -120,6 +120,11 @@ class ProvisionConnect(tmt.steps.provision.ProvisionPlugin):
else:
self.info('key', key or 'not provided', 'green')
self.debug('Using private key authentication.')
+ # TODO: something to fix in the future, multiple --key options would help.
+ # Right now, the default value is List[str], while the option is just str.
+ if isinstance(key, list):
+ data.key = key
+ else:
data.key = [key]
# And finally create the guest
