[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/44] Acceptance Tests: make username/password configurable
From: |
John Snow |
Subject: |
[PULL 07/44] Acceptance Tests: make username/password configurable |
Date: |
Thu, 27 May 2021 22:31:43 -0400 |
From: Cleber Rosa <crosa@redhat.com>
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>
---
tests/acceptance/avocado_qemu/__init__.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/acceptance/avocado_qemu/__init__.py
b/tests/acceptance/avocado_qemu/__init__.py
index 0856880000f..25f871f5bc6 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -308,6 +308,8 @@ class LinuxTest(Test, LinuxSSHMixIn):
timeout = 900
chksum = None
+ username = 'root'
+ password = 'password'
def setUp(self, ssh_pubkey=None, network_device_type='virtio-net'):
super(LinuxTest, self).setUp()
@@ -371,8 +373,8 @@ def prepare_cloudinit(self, ssh_pubkey=None):
with open(ssh_pubkey) as pubkey:
pubkey_content = pubkey.read()
cloudinit.iso(cloudinit_iso, self.name,
- username='root',
- password='password',
+ username=self.username,
+ password=self.password,
# QEMU's hard coded usermode router address
phone_home_host='10.0.2.2',
phone_home_port=self.phone_home_port,
--
2.31.1
- [PULL 00/44] Python patches, John Snow, 2021/05/27
- [PULL 01/44] Python: expose QEMUMachine's temporary directory, John Snow, 2021/05/27
- [PULL 02/44] tests/acceptance/virtiofs_submounts.py: add missing accel tag, John Snow, 2021/05/27
- [PULL 03/44] tests/acceptance/virtiofs_submounts.py: evaluate string not length, John Snow, 2021/05/27
- [PULL 04/44] Python: add utility function for retrieving port redirection, John Snow, 2021/05/27
- [PULL 05/44] Acceptance Tests: move useful ssh methods to base class, John Snow, 2021/05/27
- [PULL 06/44] Acceptance Tests: add port redirection for ssh by default, John Snow, 2021/05/27
- [PULL 07/44] Acceptance Tests: make username/password configurable,
John Snow <=
- [PULL 08/44] Acceptance Tests: set up SSH connection by default after boot for LinuxTest, John Snow, 2021/05/27
- [PULL 09/44] tests/acceptance/virtiofs_submounts.py: remove launch_vm(), John Snow, 2021/05/27
- [PULL 10/44] Acceptance Tests: add basic documentation on LinuxTest base class, John Snow, 2021/05/27
- [PULL 11/44] Acceptance Tests: introduce CPU hotplug test, John Snow, 2021/05/27
- [PULL 13/44] acceptance tests: bump Avocado version to 88.1, John Snow, 2021/05/27
- [PULL 12/44] tests/acceptance/virtiofs_submounts.py: fix setup of SSH pubkey, John Snow, 2021/05/27
- [PULL 14/44] python/console_socket: avoid one-letter variable, John Snow, 2021/05/27
- [PULL 15/44] python/machine: use subprocess.DEVNULL instead of open(os.path.devnull), John Snow, 2021/05/27
- [PULL 16/44] python/machine: use subprocess.run instead of subprocess.Popen, John Snow, 2021/05/27
- [PULL 17/44] python/console_socket: Add a pylint ignore, John Snow, 2021/05/27