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

Extend TestGateway request creation with header multi-values #737

Merged
merged 3 commits into from
Aug 13, 2020

Conversation

vermagav
Copy link
Contributor

In order to use the changes in #733 in services that consume Zanzibar, we extend the TestGateway interface to mirror its existing MakeRequest method with one that creates a test request with all, disparate values for each header's key. We choose extending the interface instead of refactoring MakeRequest to preserve backwards compatibility with all of its many consumers.

@vermagav vermagav requested a review from rpatali August 10, 2020 19:40
}
}

if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

any reason why this isn't right after where this happens?

Copy link
Contributor

Choose a reason for hiding this comment

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

Just noticed its just how other ones are too but I don't think they need to be (or at least the new ones need to be).

Copy link
Contributor Author

@vermagav vermagav Aug 10, 2020

Choose a reason for hiding this comment

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

Good catch. I moved them to the correct location in both the old and new functions. Leaving it where it was also had the potential for a nil-pointer dereference with the following block accessing a property on req.

Copy link
Contributor

@rpatali rpatali left a comment

Choose a reason for hiding this comment

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

LGTM besides the one comment

@vermagav vermagav merged commit a887726 into master Aug 13, 2020
@vermagav vermagav deleted the gverma/extend-test-gateway-to-support-header-values branch August 13, 2020 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants