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

Use more permissive validation in request mock #58557

Merged
merged 3 commits into from
Feb 26, 2020

Conversation

joshdover
Copy link
Contributor

Summary

After #51919 we started allowing request input fields to be of any shape, not just objects. However, we never updated the KibanaRequest mock to allow this.

This PR changes the default validation for the mock to schema.any() but allows the consumer to specify custom validation for testing.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@joshdover joshdover added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:New Platform release_note:skip Skip the PR/issue when compiling release notes v7.7.0 labels Feb 25, 2020
@joshdover joshdover requested a review from a team as a code owner February 25, 2020 23:33
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@joshdover joshdover force-pushed the np/request-mock-validation branch from e8d0844 to 0de7e33 Compare February 26, 2020 17:42
@joshdover joshdover requested a review from mshustov February 26, 2020 17:42
Copy link
Contributor

@mshustov mshustov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering how many ppl will define validation in tests at all 😄 probably schema.any would be enough

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

  • 💚 Build #29000 succeeded e8d08448a24d801224d70d6ddf626f06676ddeb8

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@joshdover joshdover merged commit abb2c0f into elastic:master Feb 26, 2020
@joshdover joshdover deleted the np/request-mock-validation branch February 26, 2020 19:45
joshdover added a commit to joshdover/kibana that referenced this pull request Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:New Platform release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants