-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add support for multiple test verbs and fix /_render/template. #723
Conversation
Signed-off-by: dblock <[email protected]>
Signed-off-by: dblock <[email protected]>
Changes AnalysisCommit SHA: 958c971 API ChangesSummary
ReportThe full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/12262734519/artifacts/2301701082 API Coverage
|
Spec Test Coverage Analysis
|
Signed-off-by: dblock <[email protected]>
e181909
to
2612721
Compare
Signed-off-by: dblock <[email protected]>
- POST | ||
- PUT | ||
``` | ||
|
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.
This is a great shorthand for writing the same chapter multiple times with different methods. I think we should treat it as such: Multiple chapters that virtually identical but the method. And then when the story is read, we will turn that 1 chapter of Create index "books"
into two chapter:
Create Index "book" [With POST]
Create Index "book" [With PUT]
Then you will only have to modify the story parser to turn that 1 chapter into 2 and the rest of the framework can stay intact. We can add a line in this guide saying that the chapter will be split into 2 so they know what to expect in the Result page.
Arguably, a case like this should be treat as 2 different stories because rarely are our non-PUT requests idempotent (even when you delete a resource on OS twice, you get 404 the second time). So you could not actually test this on PUT/POST /books
because executing PUT /books
after POST /books
will result in index named books already exists
error. This will open a can of worm of matrix argument when we have multiple of such chapters in an original story.
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.
Okay let me see if I can do a parser-based implementation instead ...
Closing in favor of #724 |
Description
You can now do this:
Avoids duplicating the test.
Added tests and fixed
/_render/template
.Issues Resolved
Part of #663.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.