Acceptance Tests: make username/password configurable

This makes the username/password used for authentication configurable,
because some guest operating systems may have restrictions on accounts
to be used for logins, and it just makes it better documented.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20210412044644.55083-7-crosa@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
Cleber Rosa 2021-04-12 00:46:39 -04:00 committed by John Snow
parent 54914114af
commit d8c6a89968

View File

@ -308,6 +308,8 @@ class LinuxTest(Test, LinuxSSHMixIn):
timeout = 900 timeout = 900
chksum = None chksum = None
username = 'root'
password = 'password'
def setUp(self, ssh_pubkey=None, network_device_type='virtio-net'): def setUp(self, ssh_pubkey=None, network_device_type='virtio-net'):
super(LinuxTest, self).setUp() super(LinuxTest, self).setUp()
@ -371,8 +373,8 @@ class LinuxTest(Test, LinuxSSHMixIn):
with open(ssh_pubkey) as pubkey: with open(ssh_pubkey) as pubkey:
pubkey_content = pubkey.read() pubkey_content = pubkey.read()
cloudinit.iso(cloudinit_iso, self.name, cloudinit.iso(cloudinit_iso, self.name,
username='root', username=self.username,
password='password', password=self.password,
# QEMU's hard coded usermode router address # QEMU's hard coded usermode router address
phone_home_host='10.0.2.2', phone_home_host='10.0.2.2',
phone_home_port=self.phone_home_port, phone_home_port=self.phone_home_port,