Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop redundant call report and task report tests #122

Open
Ichimonji10 opened this issue Feb 17, 2016 · 3 comments
Open

Drop redundant call report and task report tests #122

Ichimonji10 opened this issue Feb 17, 2016 · 3 comments

Comments

@Ichimonji10
Copy link
Contributor

As of c6308d4,

pulp_smash.api.safe_handler and pulp_smash.api.json_handler
check for errors in task reports and call reports, and raise
TaskReportError or CallReportError respectively if one is found.

As a result, many test methods are no longer necessary. Let's walk through tests that explicitly check call reports and task reports, drop redundant checks, and drop the code that bothers to collect and save those call reports and task reports if possible.

@Ichimonji10
Copy link
Contributor Author

#121 makes use of this new behaviour to great effect.

@elyezer
Copy link
Contributor

elyezer commented Apr 12, 2016

Had an IRC chat session with @Ichimonji10 and have clarified the following:

Both api.safe_handler and api.json_handler call _handle_202, which calls _check_call_report and _check_tasks. _check_tasks() ensures that each task's "error", "exception" and "traceback" fields. Given that, there's no reason to also check those fields in unit tests.

@Ichimonji10
Copy link
Contributor Author

Thanks for clarifying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants