-
Notifications
You must be signed in to change notification settings - Fork 2
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
Improve test coverage #7
Conversation
There is no reason why this handlers would return 404. If no runfolders are found, it should just return an empty list. If another exception pops up, it will be for a different reason and should be converted to an Internal Error (500) (which aiohttp does automatically). Same goes for `/runfolders/pickup` and `/runfolders/next`
This warning should be emitted when no metadata is found, this not only occurs when run_parameters is empty, but also if it does not contain any of the fields we look for.
This uncovered the following bug: if the instrument is not recognized, we can't know its name.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7 +/- ##
===========================================
+ Coverage 92.59% 100.00% +7.40%
===========================================
Files 8 8
Lines 243 230 -13
===========================================
+ Hits 225 230 +5
+ Misses 18 0 -18 ☔ View full report in Codecov by Sentry. |
This runfolder has a run_parameter file, but no complete marker file
Actually, I know we've discussed that before here, but I think I've changed my mind. I think |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are great changes, I think all looks good.
This PR improves the overall test coverage. While working on this, I've fixed the following issues:
/runfolders
,/runfolder/next
and/runfolder/pickup
never have to return404 Not Found
. If there is no runfolder to return, they should simply return an empty list or204 No Content
.Runfolder
, we can assume this attribute exists in all the other methods.