diff options
author | Dave Barach <dave@barachs.net> | 2019-10-09 17:28:04 -0400 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2019-10-10 15:51:09 +0000 |
commit | 5932ce17e128c096fcc56eb04b27e780da3cf255 (patch) | |
tree | 99564075e4fe60794f8886a3c7e66a7f02619017 /src/plugins/mactime/test | |
parent | a6b93eac5979f1f1166cdf6f8bfa216b243b2662 (diff) |
tests: add cli_return_response to vpp_papi_provider
To improve gcov/lcov code coverage stats, it's necessary to send
incorrect debug CLI commands; to force vpp into debug CLI error paths.
cli_return_response() sends commands and returns the response object,
so test vectors can handle failures.
Type: feature
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I4fab591c9d2e30c996f016e18e4fd69b9c5bed06
Diffstat (limited to 'src/plugins/mactime/test')
-rw-r--r-- | src/plugins/mactime/test/test_mactime.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/mactime/test/test_mactime.py b/src/plugins/mactime/test/test_mactime.py index ab3d5371815..892ae02cf22 100644 --- a/src/plugins/mactime/test/test_mactime.py +++ b/src/plugins/mactime/test/test_mactime.py @@ -149,7 +149,12 @@ class TestMactime(VppTestCase): "show error"] for cmd in cmds: - self.logger.info(self.vapi.cli(cmd)) + r = self.vapi.cli_return_response(cmd) + if r.retval != 0: + if hasattr(r, 'reply'): + self.logger.info(cmd + " FAIL reply " + r.reply) + else: + self.logger.info(cmd + " FAIL retval " + str(r.retval)) if __name__ == '__main__': unittest.main(testRunner=VppTestRunner) |