summaryrefslogtreecommitdiffstats
path: root/dovetail/tests/unit/test_parser.py
diff options
context:
space:
mode:
authorLeo Wang <grakiss.wanglei@huawei.com>2016-11-29 04:21:40 -0500
committerLeo Wang <grakiss.wanglei@huawei.com>2016-12-13 02:40:02 -0500
commit1c0f19209637572d0bd50c1a3691bc18ee6fb9ee (patch)
treec8bda462d8ca8e830bb4843e46d48c1aa0a657fd /dovetail/tests/unit/test_parser.py
parent0a90987741fe2b0a2cc81c5b8ffef46a8111f250 (diff)
[dovetail tool] support shell scripts for testcase validation
JIRA: DOVETAIL-46 1. for now a testcase has two kinds of validation types(functest, yardstick), and it is not enough to check the complete funcionality 2. add new validation type(shell) for extra validation of the test case to make result more accurate and more convincing. Change-Id: I45dca6b8dbd888757da163189d261f6e4dba5034 Signed-off-by: Leo Wang <grakiss.wanglei@huawei.com>
Diffstat (limited to 'dovetail/tests/unit/test_parser.py')
-rw-r--r--dovetail/tests/unit/test_parser.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/dovetail/tests/unit/test_parser.py b/dovetail/tests/unit/test_parser.py
index 8d32995c..410a6629 100644
--- a/dovetail/tests/unit/test_parser.py
+++ b/dovetail/tests/unit/test_parser.py
@@ -32,7 +32,8 @@ class TestParser(unittest.TestCase):
def test_parser_cmd(self):
"""Test whether the command is correctly parsed."""
- mock_cmd = "python /functest/ci/run_tests.py -t {{script_testcase}} -r"
+ mock_cmd = "python /functest/ci/run_tests.py "\
+ "-t {{validate_testcase}} -r"
with open(os.path.join(self.test_path, 'test_testcase.yaml')) as f:
mock_testcase_yaml = yaml.safe_load(f)
MockTestcase = type('Testcase', (object,), {})
@@ -45,7 +46,8 @@ class TestParser(unittest.TestCase):
def test_parser_cmd_fail(self):
"""Test whether the command is correctly parsed."""
- mock_cmd = "python /functest/ci/run_tests.py -t {{script_testcase}} -r"
+ mock_cmd = "python /functest/ci/run_tests.py "\
+ "-t {{validate_testcase}} -r"
mock_testcase_yaml = {}
MockTestcase = type('Testcase', (object,), {})
mock_testcase = MockTestcase()
@@ -55,5 +57,6 @@ class TestParser(unittest.TestCase):
"None -r")
self.assertEqual(expected_output, output)
+
if __name__ == '__main__':
unittest.main()