Skip to content

Commit e080692

Browse files
committed
Fix Tests
Signed-off-by: Rohit Agrawal <[email protected]>
1 parent 15d4c9e commit e080692

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

test/extensions/filters/network/dubbo_proxy/decoder_test.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ TEST_F(DubboDecoderStateMachineTest, ProtocolStateNameTest) {
176176
// Test that ProtocolStateNameValues::name() returns the expected string value
177177
EXPECT_EQ("StopIteration", ProtocolStateNameValues::name(ProtocolState::StopIteration));
178178
EXPECT_EQ("WaitForData", ProtocolStateNameValues::name(ProtocolState::WaitForData));
179-
EXPECT_EQ("OnDecodeStreamHeader", ProtocolStateNameValues::name(ProtocolState::OnDecodeStreamHeader));
179+
EXPECT_EQ("OnDecodeStreamHeader",
180+
ProtocolStateNameValues::name(ProtocolState::OnDecodeStreamHeader));
180181
EXPECT_EQ("OnDecodeStreamData", ProtocolStateNameValues::name(ProtocolState::OnDecodeStreamData));
181182
EXPECT_EQ("Done", ProtocolStateNameValues::name(ProtocolState::Done));
182183
}

test/extensions/internal_redirect/allow_listed_routes/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ envoy_extension_cc_test(
2121
"//test/test_common:utility_lib",
2222
"@envoy_api//envoy/extensions/internal_redirect/allow_listed_routes/v3:pkg_cc_proto",
2323
],
24-
)
24+
)

test/extensions/internal_redirect/allow_listed_routes/config_test.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#include "envoy/router/internal_redirect.h"
44

55
#include "source/common/stream_info/filter_state_impl.h"
6-
#include "source/extensions/internal_redirect/allow_listed_routes/config.h"
76
#include "source/extensions/internal_redirect/allow_listed_routes/allow_listed_routes.h"
7+
#include "source/extensions/internal_redirect/allow_listed_routes/config.h"
88

99
#include "gmock/gmock.h"
1010
#include "gtest/gtest.h"
@@ -22,10 +22,10 @@ class AllowListedRoutesTest : public testing::Test {
2222
factory_ = Registry::FactoryRegistry<Router::InternalRedirectPredicateFactory>::getFactory(
2323
"envoy.internal_redirect_predicates.allow_listed_routes");
2424
config_ = factory_->createEmptyConfigProto();
25-
26-
envoy::extensions::internal_redirect::allow_listed_routes::v3::AllowListedRoutesConfig* typed_config =
27-
dynamic_cast<envoy::extensions::internal_redirect::allow_listed_routes::v3::AllowListedRoutesConfig*>(
28-
config_.get());
25+
26+
envoy::extensions::internal_redirect::allow_listed_routes::v3::AllowListedRoutesConfig*
27+
typed_config = dynamic_cast<envoy::extensions::internal_redirect::allow_listed_routes::v3::
28+
AllowListedRoutesConfig*>(config_.get());
2929
typed_config->add_allowed_route_names("route_2");
3030
typed_config->add_allowed_route_names("route_3");
3131
}
@@ -41,10 +41,10 @@ TEST_F(AllowListedRoutesTest, PredicateTest) {
4141

4242
// Test route that is in the allow list (allowed)
4343
EXPECT_TRUE(predicate->acceptTargetRoute(filter_state_, "route_2", false, false));
44-
44+
4545
// Test another route that is in the allow list (allowed)
4646
EXPECT_TRUE(predicate->acceptTargetRoute(filter_state_, "route_3", false, false));
47-
47+
4848
// Test route that is not in the allow list (not allowed)
4949
EXPECT_FALSE(predicate->acceptTargetRoute(filter_state_, "route_1", false, false));
5050
}
@@ -58,4 +58,4 @@ TEST_F(AllowListedRoutesTest, VerifyPredicateNameFunction) {
5858
} // namespace
5959
} // namespace InternalRedirect
6060
} // namespace Extensions
61-
} // namespace Envoy
61+
} // namespace Envoy

test/extensions/internal_redirect/safe_cross_scheme/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ envoy_extension_cc_test(
2121
"//test/test_common:utility_lib",
2222
"@envoy_api//envoy/extensions/internal_redirect/safe_cross_scheme/v3:pkg_cc_proto",
2323
],
24-
)
24+
)

test/extensions/internal_redirect/safe_cross_scheme/config_test.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ TEST_F(SafeCrossSchemeTest, PredicateTest) {
3535

3636
// Test when downstream is HTTPS and target is HTTPS (allowed)
3737
EXPECT_TRUE(predicate->acceptTargetRoute(filter_state_, "route_1", true, true));
38-
38+
3939
// Test when downstream is HTTPS and target is HTTP (allowed)
4040
EXPECT_TRUE(predicate->acceptTargetRoute(filter_state_, "route_1", true, false));
41-
41+
4242
// Test when downstream is HTTP and target is HTTP (allowed)
4343
EXPECT_TRUE(predicate->acceptTargetRoute(filter_state_, "route_1", false, false));
44-
44+
4545
// Test when downstream is HTTP and target is HTTPS (not allowed)
4646
EXPECT_FALSE(predicate->acceptTargetRoute(filter_state_, "route_1", false, true));
4747
}
@@ -55,4 +55,4 @@ TEST_F(SafeCrossSchemeTest, VerifyPredicateNameFunction) {
5555
} // namespace
5656
} // namespace InternalRedirect
5757
} // namespace Extensions
58-
} // namespace Envoy
58+
} // namespace Envoy

0 commit comments

Comments
 (0)