-
Notifications
You must be signed in to change notification settings - Fork 4.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
Validate response schema for integration tests #19043
Conversation
Signed-off-by: Daniel Huckins <[email protected]>
Signed-off-by: Daniel Huckins <[email protected]>
Signed-off-by: Daniel Huckins <[email protected]>
Signed-off-by: Daniel Huckins <[email protected]>
Co-authored-by: Anton Averchenkov <[email protected]>
Signed-off-by: Daniel Huckins <[email protected]>
Signed-off-by: Daniel Huckins <[email protected]>
Signed-off-by: Daniel Huckins <[email protected]>
Signed-off-by: Daniel Huckins <[email protected]>
Signed-off-by: Daniel Huckins <[email protected]>
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.
A couple nit comments, otherwise LGTM 👍
Co-authored-by: Anton Averchenkov <[email protected]>
…o dh/response-callback
Signed-off-by: Daniel Huckins <[email protected]>
Signed-off-by: Daniel Huckins <[email protected]>
Signed-off-by: Daniel Huckins <[email protected]>
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
// | ||
// [vault.TestCluster]: https://pkg.go.dev/github.com/hashicorp/vault/vault#TestCluster | ||
func ResponseValidatingCallback(t *testing.T) func(logical.Backend, *logical.Request, *logical.Response) { | ||
type PathRouter interface { |
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.
interesting workaround here.
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.
sigh yeah... couldn't think of a better way to do it 🤷
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 like this implementation. It reminds of something similar I saw in the implementation of Go's context. 👍
see #19048 for example usage