diff options
author | xudan <xudan16@huawei.com> | 2019-05-17 04:13:30 -0400 |
---|---|---|
committer | Dan Xu <xudan16@huawei.com> | 2019-06-10 03:24:16 +0000 |
commit | fe1a78666f215a568866c4b5eb28c8feda0ad278 (patch) | |
tree | b2c93c3f7f3f28b1d91bcb5247fc2b0e4b6d715c | |
parent | dc5264ec9b19a8673204af11dbba68bdb50cfde2 (diff) |
Bugfix: Fix Dovetail 2 bugs found with CI results
There are 2 bugs found with CI results of functest.tempest.neutron_tempest_plugin_api
and all HA test cases.
Yardtsick conf file does't mapping the keyfile to Yardstick container, so all
HA test cases got SSHERROR.
Also remove some useless debug msg to make dovetail.log more concise.
Change-Id: I63c12d1b91ed5f8f8a893689384685ca9215f367
Signed-off-by: xudan <xudan16@huawei.com>
-rw-r--r-- | docs/testing/user/userguide/testing_guide.rst | 7 | ||||
-rw-r--r-- | dovetail/report.py | 2 | ||||
-rw-r--r-- | dovetail/testcase.py | 4 | ||||
-rw-r--r-- | dovetail/tests/unit/test_report.py | 10 | ||||
-rw-r--r-- | dovetail/tests/unit/test_testcase.py | 7 | ||||
-rw-r--r-- | etc/conf/yardstick_config.yml | 1 | ||||
-rw-r--r-- | etc/testcase/functest.tempest.neutron_tempest_plugin_api.yml (renamed from etc/testcase/functest.neutron_tempest_plugin_api.yml) | 3 |
7 files changed, 8 insertions, 26 deletions
diff --git a/docs/testing/user/userguide/testing_guide.rst b/docs/testing/user/userguide/testing_guide.rst index f4d9bb75..5636c982 100644 --- a/docs/testing/user/userguide/testing_guide.rst +++ b/docs/testing/user/userguide/testing_guide.rst @@ -360,10 +360,9 @@ A sample is provided below to show the required syntax when using a key file. user: root # Private ssh key for accessing the controller nodes. If a keyfile is - # being used, the path specified **must** be as shown below as this - # is the location of the user-provided private ssh key inside the - # Yardstick container. - key_filename: /home/opnfv/userconfig/pre_config/id_rsa + # being used instead of password, it **must** be put under + # ``$DOVETAIL_HOME/pre_config/. + key_filename: /home/dovetail/pre_config/id_rsa Under nodes, repeat entries for name, role, ip, user and password or key file for each of the controller/compute nodes that comprise the SUT. Use a '-' to separate each of the entries. diff --git a/dovetail/report.py b/dovetail/report.py index 65c41484..864f1165 100644 --- a/dovetail/report.py +++ b/dovetail/report.py @@ -138,7 +138,6 @@ class Report(object): 'result': testcase.sub_testcase_passed(sub_test) }) report_obj['testcases_list'].append(testcase_inreport) - self.logger.debug(json.dumps(report_obj)) return report_obj def generate(self, testcase_list, duration): @@ -621,7 +620,6 @@ class FunctestChecker(object): testcase_passed = 'PASS' for sub_testcase in sub_testcase_list: - self.logger.debug('Check sub_testcase: {}'.format(sub_testcase)) try: if self.get_sub_testcase(sub_testcase, db_result['details']['success']): diff --git a/dovetail/testcase.py b/dovetail/testcase.py index b6f54fa7..279c6ba0 100644 --- a/dovetail/testcase.py +++ b/dovetail/testcase.py @@ -77,8 +77,6 @@ class Testcase(object): def sub_testcase_passed(self, name, passed=None): if passed is not None: - self.logger.debug( - 'sub_testcase_passed: {} {}'.format(name, passed)) self.sub_testcase_status[name] = passed return self.sub_testcase_status[name] @@ -145,8 +143,6 @@ class Testcase(object): try: with open(test_list, 'w+') as src_file: for sub_test in self.sub_testcase(): - self.logger.debug( - 'Save test cases {}'.format(sub_test)) src_file.write(sub_test + '\n') self.logger.debug('Save test cases to {}'.format(test_list)) return test_list diff --git a/dovetail/tests/unit/test_report.py b/dovetail/tests/unit/test_report.py index 4840f2b5..849b31d8 100644 --- a/dovetail/tests/unit/test_report.py +++ b/dovetail/tests/unit/test_report.py @@ -1440,16 +1440,6 @@ class ReportTesting(unittest.TestCase): checker.check(testcase_obj, db_result) testcase_obj.sub_testcase.assert_called_once_with() - logger_obj.debug.assert_has_calls([ - call('Check sub_testcase: subt_a'), - call('Check sub_testcase: subt_b'), - call('Check sub_testcase: subt_c'), - call('Check sub_testcase: subt_d')]) - testcase_obj.sub_testcase_passed.assert_has_calls([ - call('subt_a', 'PASS'), - call('subt_b', 'SKIP'), - call('subt_c', 'FAIL'), - call('subt_d', 'FAIL')]) testcase_obj.passed.assert_has_calls([call('PASS'), call('FAIL')]) @patch('dovetail.report.dt_logger') diff --git a/dovetail/tests/unit/test_testcase.py b/dovetail/tests/unit/test_testcase.py index b915556c..06a23025 100644 --- a/dovetail/tests/unit/test_testcase.py +++ b/dovetail/tests/unit/test_testcase.py @@ -145,8 +145,6 @@ class TestcaseTesting(unittest.TestCase): result = testcase.sub_testcase_passed('name', 'passed') - logger_obj.debug.assert_called_once_with( - 'sub_testcase_passed: name passed') self.assertEquals('passed', result) def test_validate_type(self): @@ -265,9 +263,8 @@ class TestcaseTesting(unittest.TestCase): mock_path.join.assert_called_once_with('value', 'tempest_custom.txt') mock_open.assert_called_once_with(file_path, 'w+') file_obj.write.assert_called_once_with(sub_test + '\n') - logger_obj.debug.assert_has_calls([ - call('Save test cases {}'.format(sub_test)), - call('Save test cases to {}'.format(file_path))]) + logger_obj.debug.assert_called_once_with( + 'Save test cases to {}'.format(file_path)) self.assertEquals(file_path, result) @patch('__builtin__.open') diff --git a/etc/conf/yardstick_config.yml b/etc/conf/yardstick_config.yml index aec569c7..e4758c8e 100644 --- a/etc/conf/yardstick_config.yml +++ b/etc/conf/yardstick_config.yml @@ -48,6 +48,7 @@ yardstick: - '{{dovetail_home}}/pre_config/pod.yaml:{{pod_file}}' - '{{dovetail_home}}/images:/home/opnfv/images' - '{{dovetail_home}}/results:{{result_dir}}' + - '{{dovetail_home}}/pre_config:{{dovetail_home}}/pre_config' pre_condition: - 'echo this is pre_condition' cmds: diff --git a/etc/testcase/functest.neutron_tempest_plugin_api.yml b/etc/testcase/functest.tempest.neutron_tempest_plugin_api.yml index 02e56b4a..70634270 100644 --- a/etc/testcase/functest.neutron_tempest_plugin_api.yml +++ b/etc/testcase/functest.tempest.neutron_tempest_plugin_api.yml @@ -23,7 +23,8 @@ functest.tempest.neutron_tempest_plugin_api: - neutron_tempest_plugin_api_logs/functest.tempest.neutron_tempest_plugin_api.functest.log - neutron_tempest_plugin_api_logs/functest.tempest.neutron_tempest_plugin_api.log - neutron_tempest_plugin_api_logs/functest.tempest.neutron_tempest_plugin_api.html - check_results_file: 'functest_results.txt' + check_results_files: + - 'functest_results.txt' sub_testcase_list: - neutron_tempest_plugin.api.test_qos.QosBandwidthLimitRuleTestJSON.test_rule_create - neutron_tempest_plugin.api.test_qos.QosBandwidthLimitRuleTestJSON.test_get_rules_by_policy |