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

Validate response schema for integration tests #19043

Merged
merged 17 commits into from
Feb 15, 2023
Merged

Conversation

dhuckins
Copy link
Contributor

@dhuckins dhuckins commented Feb 7, 2023

see #19048 for example usage

Signed-off-by: Daniel Huckins <[email protected]>
Signed-off-by: Daniel Huckins <[email protected]>
vault/core.go Outdated Show resolved Hide resolved
Co-authored-by: Anton Averchenkov <[email protected]>
vault/core.go Outdated Show resolved Hide resolved
Copy link
Contributor

@averche averche left a 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 👍

vault/testing.go Outdated Show resolved Hide resolved
dhuckins and others added 4 commits February 14, 2023 10:55
@dhuckins dhuckins marked this pull request as ready for review February 14, 2023 17:48
@dhuckins dhuckins added this to the 1.14 milestone Feb 14, 2023
@dhuckins dhuckins self-assigned this Feb 14, 2023
@dhuckins dhuckins added the devex Developer Experience label Feb 14, 2023
Copy link
Collaborator

@lursu lursu left a 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 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

interesting workaround here.

Copy link
Contributor Author

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 🤷

Copy link
Contributor

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. 👍

@dhuckins dhuckins merged commit ede32d5 into main Feb 15, 2023
@dhuckins dhuckins deleted the dh/response-callback branch February 15, 2023 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devex Developer Experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants