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

test should panic! on illegal not_on datetime bounds #464

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tijlleenders
Copy link
Owner

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 and observed.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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

1 participant