-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Management] Relationships API test coverage #19737
[Management] Relationships API test coverage #19737
Conversation
💔 Build Failed |
Just to clarify: these are |
@epixa Thanks for the reminder. Keep getting confused because of the directory structure. Noted. Does this title and description work better? |
…tionships API for when no result is found. Return 404.
Fixes #19713 |
💔 Build Failed |
jenkins test this |
💚 Build Succeeded |
Looks great @silne30! One thing we might want to do, per our conversation on zoom, is to leave the lib file alone and capture all 404 errors at the route level, then return an explicit 404. Something like this diff:
|
💔 Build Failed |
jenkins test this |
💔 Build Failed |
jenkins test this again |
💔 Build Failed |
Hey @silne30 Sorry for leaving you hanging for a few days about these tests. This patch should fix the build errors:
|
💚 Build Succeeded |
💚 Build Succeeded |
@chrisronline @jen-huang Whichever one of you wanna merge this bad boy, feel free. |
@silne30 We currently have https://github.com/hapijs/joi for schema validation. Is it possible to use that instead of |
@chrisronline Yeah. I just throw code on the wall for you guys to tell me all the things I need to change. Working on that now. |
💚 Build Succeeded |
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.
Looks great! One request
package.json
Outdated
@@ -1,15 +1,8 @@ | |||
{ | |||
"name": "kibana", | |||
"description": "Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elasticsearch.", |
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.
Can revert these changes? Doesn't seem necessary
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.
Absolutely. Not even sure when that happened.
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.
I'm still seeing changes here. Try just copying the file from master (https://raw.githubusercontent.com/elastic/kibana/master/package.json) into your copy and commit/push that up
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.
LGTM!
💚 Build Succeeded |
* Added coverage around search and dashboard tests. * Added tests to check for whether the resource is available. If not, return 404. * Skipped two tests due to elastic#19713. Added error handling for relationships API for when no result is found. Return 404. * Applied patch file per PR. * Applied Chris patch and tested locally. No failures. * Removed ajv and utilised joi for schema validation. * Fixed package.json. * Copied package.json description from master. * Reverted package.json and made proper edit.
* Added coverage around search and dashboard tests. * Added tests to check for whether the resource is available. If not, return 404. * Skipped two tests due to elastic#19713. Added error handling for relationships API for when no result is found. Return 404. * Applied patch file per PR. * Applied Chris patch and tested locally. No failures. * Removed ajv and utilised joi for schema validation. * Fixed package.json. * Copied package.json description from master. * Reverted package.json and made proper edit.
* Added coverage around search and dashboard tests. * Added tests to check for whether the resource is available. If not, return 404. * Skipped two tests due to #19713. Added error handling for relationships API for when no result is found. Return 404. * Applied patch file per PR. * Applied Chris patch and tested locally. No failures. * Removed ajv and utilised joi for schema validation. * Fixed package.json. * Copied package.json description from master. * Reverted package.json and made proper edit.
Added some tests around the relationships endpoints for management to validate responses and check error handling.