Skip to content

fix: Only send mtlsEndpoint if it is non-null #3767

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

Merged
merged 5 commits into from
May 2, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: Add tests for a the mtlsEndpoint check
  • Loading branch information
lqiu96 committed May 2, 2025
commit 5e9533cf8c0353743548da2e53bfce89486c450b
Original file line number Diff line number Diff line change
Expand Up @@ -1264,8 +1264,7 @@ void testSetApiKey_withDefaultCredentials_overridesCredentials() throws IOExcept
@Test
void test_nullMtlsEndpointIsNotPassedToTransportChannel() throws IOException {
// Set the mtlsEndpoint in the TransportChannelProvider as null. This configures the
// ClientContext
// to attempt to pass the mtlsEndpoint over.
// ClientContext to attempt to pass the mtlsEndpoint over.
TransportChannelProvider transportChannelProvider =
new FakeTransportProvider(
FakeTransportChannel.create(new FakeChannel()), null, true, null, null, null, null);
Expand All @@ -1276,6 +1275,7 @@ void test_nullMtlsEndpointIsNotPassedToTransportChannel() throws IOException {
new FakeStubSettings.Builder()
.setEndpoint(DEFAULT_ENDPOINT)
// Set this to be null so that the resolved mtls endpoint is null
// This resolved value should not be passed to the TransportChannelProvider
.setMtlsEndpoint(null)
.build();
ClientSettings.Builder clientSettingsBuilder = new FakeClientSettings.Builder(settings);
Expand Down
Loading