47 lines
1.9 KiB
Diff
47 lines
1.9 KiB
Diff
|
From d6ddc8e6250bf3c07633a84b81e8f4b66c23c0e5 Mon Sep 17 00:00:00 2001
|
||
|
From: Petr Stodulka <pstodulk@redhat.com>
|
||
|
Date: Fri, 25 Nov 2022 17:11:26 +0100
|
||
|
Subject: [PATCH 33/37] testutils: Implement get_common_tool_path method
|
||
|
|
||
|
---
|
||
|
repos/system_upgrade/common/libraries/testutils.py | 8 +++++---
|
||
|
1 file changed, 5 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/repos/system_upgrade/common/libraries/testutils.py b/repos/system_upgrade/common/libraries/testutils.py
|
||
|
index fc20aa3b..c538af1a 100644
|
||
|
--- a/repos/system_upgrade/common/libraries/testutils.py
|
||
|
+++ b/repos/system_upgrade/common/libraries/testutils.py
|
||
|
@@ -75,7 +75,9 @@ class CurrentActorMocked(object): # pylint:disable=R0904
|
||
|
release = namedtuple('OS_release', ['release_id', 'version_id'])(release_id, src_ver)
|
||
|
|
||
|
self._common_folder = '../../files'
|
||
|
+ self._common_tools_folder = '../../tools'
|
||
|
self._actor_folder = 'files'
|
||
|
+ self._actor_tools_folder = 'tools'
|
||
|
self.configuration = namedtuple(
|
||
|
'configuration', ['architecture', 'kernel', 'leapp_env_vars', 'os_release', 'version', 'flavour']
|
||
|
)(arch, kernel, envarsList, release, version, flavour)
|
||
|
@@ -87,6 +89,9 @@ class CurrentActorMocked(object): # pylint:disable=R0904
|
||
|
def get_common_folder_path(self, folder):
|
||
|
return os.path.join(self._common_folder, folder)
|
||
|
|
||
|
+ def get_common_tool_path(self, name):
|
||
|
+ return os.path.join(self._common_tools_folder, name)
|
||
|
+
|
||
|
def consume(self, model):
|
||
|
return iter(filter( # pylint:disable=W0110,W1639
|
||
|
lambda msg: isinstance(msg, model), self._msgs
|
||
|
@@ -149,9 +154,6 @@ class CurrentActorMocked(object): # pylint:disable=R0904
|
||
|
def get_tool_path(self, name):
|
||
|
raise NotImplementedError
|
||
|
|
||
|
- def get_common_tool_path(self, name):
|
||
|
- raise NotImplementedError
|
||
|
-
|
||
|
def get_actor_tool_path(self, name):
|
||
|
raise NotImplementedError
|
||
|
|
||
|
--
|
||
|
2.38.1
|
||
|
|