summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-08-07 05:54:51 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-08-07 10:56:00 +0200
commita624e4a9a03d03cbfecc4bdcd5fb91068205b36d (patch)
tree58772c407cc9c363bb202f02527e36c05664331d
parent27bc4acea711b5e6e09102bdc4209c9ef13283f3 (diff)
Update Xtesting to 0.55.0
It allows calling one skipped test via run_tests (parallel testing). Change-Id: I04e5c69f2129e28f1451815938cd5d0f8bbe9e44 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--functest/tests/unit/odl/test_odl.py34
-rw-r--r--upper-constraints.txt2
2 files changed, 32 insertions, 4 deletions
diff --git a/functest/tests/unit/odl/test_odl.py b/functest/tests/unit/odl/test_odl.py
index 5be956c48..6a2c5ad55 100644
--- a/functest/tests/unit/odl/test_odl.py
+++ b/functest/tests/unit/odl/test_odl.py
@@ -247,10 +247,34 @@ class ODLMainTesting(ODLTesting):
@mock.patch('os.makedirs')
@mock.patch('robot.run')
@mock.patch('os.path.isfile', return_value=True)
+ def test_generate_report_ko(self, *args):
+ with mock.patch.object(self.test, 'set_robotframework_vars',
+ return_value=True), \
+ mock.patch.object(self.test, 'parse_results'), \
+ mock.patch.object(self.test, 'generate_report',
+ return_value=1):
+ self._test_run_suites(testcase.TestCase.EX_RUN_ERROR, *args)
+
+ @mock.patch('os.makedirs')
+ @mock.patch('robot.run')
+ @mock.patch('os.path.isfile', return_value=True)
+ def test_generate_report_exc(self, *args):
+ with mock.patch.object(self.test, 'set_robotframework_vars',
+ return_value=True), \
+ mock.patch.object(self.test, 'parse_results'), \
+ mock.patch.object(self.test, 'generate_report',
+ side_effect=Exception):
+ self._test_run_suites(testcase.TestCase.EX_RUN_ERROR, *args)
+
+ @mock.patch('os.makedirs')
+ @mock.patch('robot.run')
+ @mock.patch('os.path.isfile', return_value=True)
def test_ok(self, *args):
with mock.patch.object(self.test, 'set_robotframework_vars',
return_value=True), \
- mock.patch.object(self.test, 'parse_results'):
+ mock.patch.object(self.test, 'parse_results'), \
+ mock.patch.object(self.test, 'generate_report',
+ return_value=0):
self._test_run_suites(testcase.TestCase.EX_OK, *args)
@mock.patch('os.makedirs')
@@ -259,7 +283,9 @@ class ODLMainTesting(ODLTesting):
def test_ok_no_creds(self, *args):
with mock.patch.object(self.test, 'set_robotframework_vars',
return_value=True) as mock_method, \
- mock.patch.object(self.test, 'parse_results'):
+ mock.patch.object(self.test, 'parse_results'), \
+ mock.patch.object(self.test, 'generate_report',
+ return_value=0):
self._test_run_suites(testcase.TestCase.EX_OK, *args)
mock_method.assert_not_called()
@@ -269,7 +295,9 @@ class ODLMainTesting(ODLTesting):
def test_testcases_in_failure(self, *args):
with mock.patch.object(self.test, 'set_robotframework_vars',
return_value=True), \
- mock.patch.object(self.test, 'parse_results'):
+ mock.patch.object(self.test, 'parse_results'), \
+ mock.patch.object(self.test, 'generate_report',
+ return_value=0):
self._test_run_suites(testcase.TestCase.EX_OK, *args)
diff --git a/upper-constraints.txt b/upper-constraints.txt
index add0f7f26..bbd08b644 100644
--- a/upper-constraints.txt
+++ b/upper-constraints.txt
@@ -17,6 +17,6 @@ robotframework-httplibrary===0.4.2
robotframework-requests===0.4.7
robotframework-sshlibrary===2.1.3;python_version=='2.7'
ansible===2.3.2.0
-xtesting===0.54.0
+xtesting===0.55.0
networking-bgpvpn===8.0.0
sphinx-opnfv-theme===0.1.1