[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/22] tests/acceptance/virtiofs_submounts.py: use workdir proper
From: |
Cleber Rosa |
Subject: |
[PATCH 04/22] tests/acceptance/virtiofs_submounts.py: use workdir property |
Date: |
Wed, 3 Feb 2021 12:23:39 -0500 |
For Avocado Instrumented based tests, it's a better idea to just use
the property. The environment variable is a fall back for tests not
written using that Python API.
Reference:
https://avocado-framework.readthedocs.io/en/84.0/api/test/avocado.html#avocado.Test.workdir
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/acceptance/virtiofs_submounts.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tests/acceptance/virtiofs_submounts.py
b/tests/acceptance/virtiofs_submounts.py
index 361e5990b6..68d3cd6869 100644
--- a/tests/acceptance/virtiofs_submounts.py
+++ b/tests/acceptance/virtiofs_submounts.py
@@ -136,8 +136,7 @@ class VirtiofsSubmountsTest(BootLinux):
return (stdout, stderr, ret)
def set_up_shared_dir(self):
- atwd = os.getenv('AVOCADO_TEST_WORKDIR')
- self.shared_dir = os.path.join(atwd, 'virtiofs-shared')
+ self.shared_dir = os.path.join(self.workdir, 'virtiofs-shared')
os.mkdir(self.shared_dir)
@@ -234,8 +233,7 @@ class VirtiofsSubmountsTest(BootLinux):
self.seed = self.params.get('seed')
- atwd = os.getenv('AVOCADO_TEST_WORKDIR')
- self.ssh_key = os.path.join(atwd, 'id_ed25519')
+ self.ssh_key = os.path.join(self.workdir, 'id_ed25519')
self.run(('ssh-keygen', '-t', 'ed25519', '-f', self.ssh_key))
--
2.25.4
- [PATCH 17/22] Acceptance Tests: fix population of public key in cloudinit image, (continued)
- [PATCH 17/22] Acceptance Tests: fix population of public key in cloudinit image, Cleber Rosa, 2021/02/03
- [PATCH 19/22] Acceptance Tests: add port redirection for ssh by default, Cleber Rosa, 2021/02/03
- [PATCH 20/22] Acceptance Tests: add basic documentation on LinuxTest base class, Cleber Rosa, 2021/02/03
- [PATCH 04/22] tests/acceptance/virtiofs_submounts.py: use workdir property,
Cleber Rosa <=
- [PATCH 21/22] Acceptance Tests: introduce CPU hotplug test, Cleber Rosa, 2021/02/03
- [PATCH 22/22] [NOTFORMERGE] Bump Avocado version to latest master, Cleber Rosa, 2021/02/03
- [PATCH 01/22] tests/acceptance/boot_linux.py: fix typo on cloudinit error message, Cleber Rosa, 2021/02/03