From dbcae9d07be758e2fbb14f6f8dcd3d131c7fbd19 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Wed, 28 Feb 2018 18:46:13 +0100 Subject: Switch from /home/opnfv/functest to /var/lib/xtesting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Functest containers will have to create symlinks to allow publishing artifacts. All classes create the mandatory dirs. Change-Id: Ia1f215005d553dd6d64685e4d8a3f5c843c5db7a Signed-off-by: Cédric Ollivier --- xtesting/tests/unit/core/test_feature.py | 2 +- xtesting/tests/unit/core/test_robotframework.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'xtesting/tests') diff --git a/xtesting/tests/unit/core/test_feature.py b/xtesting/tests/unit/core/test_feature.py index 9bbe5331..3d3b66d3 100644 --- a/xtesting/tests/unit/core/test_feature.py +++ b/xtesting/tests/unit/core/test_feature.py @@ -24,7 +24,7 @@ class FeatureTestingBase(unittest.TestCase): _project_name = "bar" _repo = "dir_repo_bar" _cmd = "run_bar_tests.py" - _output_file = '/home/opnfv/xtesting/results/foo.log' + _output_file = '/var/lib/xtesting/results/foo.log' feature = None @mock.patch('time.time', side_effect=[1, 2]) diff --git a/xtesting/tests/unit/core/test_robotframework.py b/xtesting/tests/unit/core/test_robotframework.py index 7131b7e2..93111f38 100644 --- a/xtesting/tests/unit/core/test_robotframework.py +++ b/xtesting/tests/unit/core/test_robotframework.py @@ -169,6 +169,7 @@ class RunTesting(unittest.TestCase): self._test_makedirs() args[0].assert_called_once_with(self.test.res_dir) + @mock.patch('os.makedirs') @mock.patch('robot.run') def _test_parse_results(self, status, *args): self.assertEqual( @@ -180,6 +181,7 @@ class RunTesting(unittest.TestCase): *self.suites, log='NONE', output=self.test.xml_file, report='NONE', stdout=mock.ANY, variable=self.variable, variablefile=self.variablefile) + args[1].assert_called_once_with(self.test.res_dir) def test_parse_results_exc(self): with mock.patch.object(self.test, 'parse_results', -- cgit 1.2.3-korg