test should panic! on illegal not_on
datetime bounds
#464
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The frontend shouldn't send any not_on block that starts (and possibly ends) before the starting date of the requested Calendar, as noted in tijlleenders/ZinZen#1959
When this specific case is detected, as specified in the
input.json
we should expect the Scheduler to panic with a helpful message 'not_on block is out of Calendar bounds', ideally with the offending Goal id, title and the not_on dates, as well as the Calendar dates.This PR is to implement and test just that - to that we get a good error message when the front-end fails to send the required input. This is not for the scheduler to fix - as we want to avoid irrelevant not_on info piling up in the storage frontend.
The
expected.json
andobserved.json
can be removed - they are not relevant to this test case, but we might need a different structure for tests that pass when a panic is generated...