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

Better validation for Datasets #130

Open
masojus opened this issue Nov 4, 2017 · 2 comments
Open

Better validation for Datasets #130

masojus opened this issue Nov 4, 2017 · 2 comments

Comments

@masojus
Copy link
Contributor

masojus commented Nov 4, 2017

From review comments:

We should make sure these two names follow the rules for naming Cached Queries/Datasets: Names of Cached Datasets should be unique and can only contain alphanumeric characters, hypens ( - ), and underscores ( _ ) but the Display Name can be more human readable.

and

Both DatasetDefinition and QueryDefinition need more validation--e.g. timeframe must be relative, the timeframe units must match the interval, index_by cannot match a group_by property, etc.

@masojus masojus mentioned this issue Nov 4, 2017
@masojus
Copy link
Contributor Author

masojus commented Nov 11, 2017

The unit tests for Datasets could also be augmented to check the actual structure of the URL or POST payload that is being sent, and also make sure that in success and error cases, the right values (if/when there can be ambiguity in how JSON.net deserializes) are in the response.

@masojus
Copy link
Contributor Author

masojus commented Nov 11, 2017

Example from PR #128 :

"This test seems like it doesn't quite cover all validation. For example it doesn't really test that AnalysisType being unset will ever throw. Maybe separate tests for each invalid condition would be warranted? Maybe start with a valid dataset and then modify only one field at a time per-test and assert that it throws?"

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

No branches or pull requests

1 participant