summaryrefslogtreecommitdiffstats
path: root/dovetail/tests/unit/test_run.py
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2018-12-20 01:49:22 -0500
committerxudan <xudan16@huawei.com>2018-12-20 21:57:03 -0500
commit78b0062ce9dc4d23b967112a0896f12cc6526e1c (patch)
tree9709b51d30bf87a1b2458f118d90cd1b2610e53c /dovetail/tests/unit/test_run.py
parent8ab783f403984b3ef9a6c3010a9a81c0f29c4236 (diff)
Simplify project conf files
1. use copy commands instead of pre_copy 2. remove redundant items in project conf files 3. make the volume mapping clearer Change-Id: I6c6aa58fac65d7e40105e0a54f6544ee5c47db31 Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'dovetail/tests/unit/test_run.py')
-rw-r--r--dovetail/tests/unit/test_run.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/dovetail/tests/unit/test_run.py b/dovetail/tests/unit/test_run.py
index c7fe4d6d..fed198c0 100644
--- a/dovetail/tests/unit/test_run.py
+++ b/dovetail/tests/unit/test_run.py
@@ -259,7 +259,8 @@ class RunTesting(unittest.TestCase):
dovetail_home = 'dovetail_home'
mock_os.environ = {'DOVETAIL_HOME': dovetail_home}
mock_os.path.join.side_effect = [
- 'result_path', 'images_dir', 'pre_config_path', 'patch_set_path']
+ 'result_path', 'images_dir', 'pre_config_path', 'patch_set_path',
+ 'userconfig_dir']
mock_config.dovetail_config = {}
result = dt_run.get_result_path()
@@ -268,12 +269,14 @@ class RunTesting(unittest.TestCase):
call(dovetail_home, 'results'),
call(dovetail_home, 'images'),
call(dovetail_home, 'pre_config'),
- call(dovetail_home, 'patches')])
+ call(dovetail_home, 'patches'),
+ call(dovetail_home, 'userconfig')])
expected_dict = {
'result_dir': 'result_path',
'images_dir': 'images_dir',
'config_dir': 'pre_config_path',
- 'patch_dir': 'patch_set_path'}
+ 'patch_dir': 'patch_set_path',
+ 'userconfig_dir': 'userconfig_dir'}
self.assertEquals(expected_dict, mock_config.dovetail_config)
self.assertEquals(dovetail_home, result)
@@ -291,7 +294,7 @@ class RunTesting(unittest.TestCase):
@patch('dovetail.run.os')
def test_copy_userconfig_files(self, mock_os, mock_utils, mock_config,
mock_constants):
- mock_config.dovetail_config = {'config_dir': 'value'}
+ mock_config.dovetail_config = {'userconfig_dir': 'value'}
mock_os.path.isdir.return_value = False
mock_constants.USERCONF_PATH = 'value'
logger = Mock()