Skip to content

Commit 52beb06

Browse files
jamessyngehtuch
authored andcommitted
test: Wrap proto string in std::string before comparison (#4238)
Risk Level: Low Testing: Unit Docs Changes: N/A Release Notes: N/A Signed-off-by: James Synge <[email protected]>
1 parent f5e219e commit 52beb06

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/integration/hds_integration_test.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,9 @@ class HdsIntegrationTest : public HttpIntegrationTest,
179179
if (address->ip()->port() != endpoint.endpoint().address().socket_address().port_value()) {
180180
return false;
181181
}
182+
// SocketAddress.address is a proto string, not std::string, so convert it before comparing.
182183
if (address->ip()->addressAsString() !=
183-
endpoint.endpoint().address().socket_address().address()) {
184+
absl::string_view(endpoint.endpoint().address().socket_address().address())) {
184185
return false;
185186
}
186187
return true;

0 commit comments

Comments
 (0)