Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Change-Id: I835d26ec21a843fb4905413768a457bef3aca3a6
Signed-off-by: Kuat Yessenov <[email protected]>
  • Loading branch information
kyessenov committed Mar 26, 2024
1 parent a8d7520 commit c838106
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
13 changes: 12 additions & 1 deletion test/extensions/path/uri_template_lib/uri_template_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,21 @@

#include "gtest/gtest.h"

// NOLINT(namespace-envoy)
// Overload functions in std library.
namespace std {

std::ostream& operator<<(std::ostream& os,
const Envoy::Extensions::UriTemplate::RewriteSegment& seg) {
absl::visit([&os](auto&& arg) { os << arg; }, seg);
return os;
}

} // namespace std

namespace Envoy {
namespace Extensions {
namespace UriTemplate {

namespace {

using ::Envoy::StatusHelpers::IsOkAndHolds;
Expand Down
8 changes: 5 additions & 3 deletions test/server/hot_restarting_child_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,11 @@ TEST_F(HotRestartingChildTest, ForwardsPacketToRegisteredListenerOnMatch) {
packet->set_payload(udp_contents);
packet->set_receive_time_epoch_microseconds(packet_timestamp);
Network::MockUdpListenerWorkerRouter mock_worker_router;
EXPECT_CALL(*mock_udp_listener_config,
listenerWorkerRouter(WhenDynamicCastTo<const Network::Address::Ipv4Instance&>(
Eq(dynamic_cast<const Network::Address::Ipv4Instance&>(*test_listener_addr)))))
EXPECT_CALL(*mock_udp_listener_config, listenerWorkerRouter(testing::ResultOf(
[](const Network::Address::Instance& instance) {
return instance.asStringView();
},
Eq(test_listener_addr->asStringView()))))
.WillOnce(ReturnRef(mock_worker_router));
EXPECT_CALL(mock_worker_router,
deliver(worker_index, IsUdpWith(test_listener_addr, test_remote_addr, udp_contents,
Expand Down

0 comments on commit c838106

Please sign in to comment.