From cc819bb6ef822b4ef6cfac9987e45fc1fc78e930 Mon Sep 17 00:00:00 2001 From: Yangmin Date: Wed, 5 Sep 2018 12:50:42 -0700 Subject: [PATCH 1/3] Fix the peerIsOptional and originIsOptional for authn filter. (#1959) --- src/envoy/http/authn/http_filter.cc | 8 ++-- src/envoy/http/authn/http_filter_test.cc | 60 +++++++++++++++++++++++- 2 files changed, 63 insertions(+), 5 deletions(-) diff --git a/src/envoy/http/authn/http_filter.cc b/src/envoy/http/authn/http_filter.cc index 27e14b8a088..6889ae8ed66 100644 --- a/src/envoy/http/authn/http_filter.cc +++ b/src/envoy/http/authn/http_filter.cc @@ -52,16 +52,16 @@ FilterHeadersStatus AuthenticationFilter::decodeHeaders(HeaderMap& headers, Payload payload; - if (!filter_config_.policy().peer_is_optional() && - !createPeerAuthenticator(filter_context_.get())->run(&payload)) { + if (!createPeerAuthenticator(filter_context_.get())->run(&payload) && + !filter_config_.policy().peer_is_optional()) { rejectRequest("Peer authentication failed."); removeJwtPayloadFromHeaders(); return FilterHeadersStatus::StopIteration; } bool success = - filter_config_.policy().origin_is_optional() || - createOriginAuthenticator(filter_context_.get())->run(&payload); + createOriginAuthenticator(filter_context_.get())->run(&payload) || + filter_config_.policy().origin_is_optional(); // After Istio authn, the JWT headers consumed by Istio authn should be // removed. diff --git a/src/envoy/http/authn/http_filter_test.cc b/src/envoy/http/authn/http_filter_test.cc index a71d60aeb56..86588c9747b 100644 --- a/src/envoy/http/authn/http_filter_test.cc +++ b/src/envoy/http/authn/http_filter_test.cc @@ -126,7 +126,7 @@ TEST_F(AuthenticationFilterTest, PeerFail) { EXPECT_FALSE(Utils::Authentication::HasResultInHeader(request_headers_)); } -TEST_F(AuthenticationFilterTest, PeerPassOrginFail) { +TEST_F(AuthenticationFilterTest, PeerPassOriginFail) { // Peer pass thus origin authentication must be called. Final result should // fail as origin authn fails. EXPECT_CALL(filter_, createPeerAuthenticator(_)) @@ -168,8 +168,66 @@ TEST_F(AuthenticationFilterTest, IgnoreBothFail) { *filter_config_.mutable_policy() = policy_; StrictMock filter(filter_config_); filter.setDecoderFilterCallbacks(decoder_callbacks_); + + EXPECT_CALL(filter, createPeerAuthenticator(_)) + .Times(1) + .WillOnce(Invoke(createAlwaysFailAuthenticator)); + EXPECT_CALL(filter, createOriginAuthenticator(_)) + .Times(1) + .WillOnce(Invoke(createAlwaysFailAuthenticator)); + EXPECT_EQ(Http::FilterHeadersStatus::Continue, + filter.decodeHeaders(request_headers_, true)); +} + +TEST_F(AuthenticationFilterTest, IgnoreBothPass) { + iaapi::Policy policy_; + ASSERT_TRUE( + Protobuf::TextFormat::ParseFromString(ingoreBothPolicy, &policy_)); + *filter_config_.mutable_policy() = policy_; + StrictMock filter(filter_config_); + filter.setDecoderFilterCallbacks(decoder_callbacks_); + + EXPECT_CALL(filter, createPeerAuthenticator(_)) + .Times(1) + .WillOnce(Invoke(createAlwaysPassAuthenticator)); + EXPECT_CALL(filter, createOriginAuthenticator(_)) + .Times(1) + .WillOnce(Invoke(createAlwaysPassAuthenticator)); + RequestInfo::RequestInfoImpl request_info(Http::Protocol::Http2); + EXPECT_CALL(decoder_callbacks_, requestInfo()) + .Times(AtLeast(1)) + .WillRepeatedly(ReturnRef(request_info)); + EXPECT_EQ(Http::FilterHeadersStatus::Continue, filter.decodeHeaders(request_headers_, true)); + + EXPECT_EQ(1, request_info.dynamicMetadata().filter_metadata_size()); + const auto *data = Utils::Authentication::GetResultFromMetadata( + request_info.dynamicMetadata()); + ASSERT_TRUE(data); + + ProtobufWkt::Struct expected_data; + ASSERT_TRUE(Protobuf::TextFormat::ParseFromString(R"( + fields { + key: "source.namespace" + value { + string_value: "test_ns" + } + } + fields { + key: "source.principal" + value { + string_value: "cluster.local/sa/test_user/ns/test_ns/" + } + } + fields { + key: "source.user" + value { + string_value: "cluster.local/sa/test_user/ns/test_ns/" + } + })", + &expected_data)); + EXPECT_TRUE(TestUtility::protoEqual(expected_data, *data)); } } // namespace From bef097ec82bbdc4e27ebf1c88c95ae8b4e029675 Mon Sep 17 00:00:00 2001 From: Yangmin Zhu Date: Wed, 12 Sep 2018 11:38:03 -0700 Subject: [PATCH 2/3] revert test that has extra dependencies. --- src/envoy/http/authn/http_filter_test.cc | 55 +------------------ .../http/authn/origin_authenticator_test.cc | 2 +- .../http/authn/peer_authenticator_test.cc | 2 +- .../http/jwt_auth/jwt_authenticator_test.cc | 2 +- .../http/jwt_auth/token_extractor_test.cc | 2 +- .../api_spec/http_api_spec_parser_test.cc | 2 +- .../control/http/attributes_builder_test.cc | 2 +- .../control/http/request_handler_impl_test.cc | 2 +- .../control/tcp/attributes_builder_test.cc | 2 +- .../control/tcp/request_handler_impl_test.cc | 2 +- src/istio/mixerclient/client_impl_test.cc | 2 +- src/istio/mixerclient/quota_cache_test.cc | 2 +- src/istio/mixerclient/report_batch_test.cc | 2 +- 13 files changed, 14 insertions(+), 65 deletions(-) diff --git a/src/envoy/http/authn/http_filter_test.cc b/src/envoy/http/authn/http_filter_test.cc index 86588c9747b..07b08c40d06 100644 --- a/src/envoy/http/authn/http_filter_test.cc +++ b/src/envoy/http/authn/http_filter_test.cc @@ -30,10 +30,10 @@ using Envoy::Http::Istio::AuthN::FilterContext; using istio::authn::Payload; using istio::authn::Result; using istio::envoy::config::filter::http::authn::v2alpha1::FilterConfig; +using testing::_; using testing::Invoke; using testing::NiceMock; using testing::StrictMock; -using testing::_; namespace iaapi = istio::authentication::v1alpha1; @@ -126,7 +126,7 @@ TEST_F(AuthenticationFilterTest, PeerFail) { EXPECT_FALSE(Utils::Authentication::HasResultInHeader(request_headers_)); } -TEST_F(AuthenticationFilterTest, PeerPassOriginFail) { +TEST_F(AuthenticationFilterTest, PeerPassOrginFail) { // Peer pass thus origin authentication must be called. Final result should // fail as origin authn fails. EXPECT_CALL(filter_, createPeerAuthenticator(_)) @@ -179,57 +179,6 @@ TEST_F(AuthenticationFilterTest, IgnoreBothFail) { filter.decodeHeaders(request_headers_, true)); } -TEST_F(AuthenticationFilterTest, IgnoreBothPass) { - iaapi::Policy policy_; - ASSERT_TRUE( - Protobuf::TextFormat::ParseFromString(ingoreBothPolicy, &policy_)); - *filter_config_.mutable_policy() = policy_; - StrictMock filter(filter_config_); - filter.setDecoderFilterCallbacks(decoder_callbacks_); - - EXPECT_CALL(filter, createPeerAuthenticator(_)) - .Times(1) - .WillOnce(Invoke(createAlwaysPassAuthenticator)); - EXPECT_CALL(filter, createOriginAuthenticator(_)) - .Times(1) - .WillOnce(Invoke(createAlwaysPassAuthenticator)); - RequestInfo::RequestInfoImpl request_info(Http::Protocol::Http2); - EXPECT_CALL(decoder_callbacks_, requestInfo()) - .Times(AtLeast(1)) - .WillRepeatedly(ReturnRef(request_info)); - - EXPECT_EQ(Http::FilterHeadersStatus::Continue, - filter.decodeHeaders(request_headers_, true)); - - EXPECT_EQ(1, request_info.dynamicMetadata().filter_metadata_size()); - const auto *data = Utils::Authentication::GetResultFromMetadata( - request_info.dynamicMetadata()); - ASSERT_TRUE(data); - - ProtobufWkt::Struct expected_data; - ASSERT_TRUE(Protobuf::TextFormat::ParseFromString(R"( - fields { - key: "source.namespace" - value { - string_value: "test_ns" - } - } - fields { - key: "source.principal" - value { - string_value: "cluster.local/sa/test_user/ns/test_ns/" - } - } - fields { - key: "source.user" - value { - string_value: "cluster.local/sa/test_user/ns/test_ns/" - } - })", - &expected_data)); - EXPECT_TRUE(TestUtility::protoEqual(expected_data, *data)); -} - } // namespace } // namespace AuthN } // namespace Istio diff --git a/src/envoy/http/authn/origin_authenticator_test.cc b/src/envoy/http/authn/origin_authenticator_test.cc index 8aeaa85215f..e5f420fdaf1 100644 --- a/src/envoy/http/authn/origin_authenticator_test.cc +++ b/src/envoy/http/authn/origin_authenticator_test.cc @@ -27,13 +27,13 @@ namespace iaapi = istio::authentication::v1alpha1; using istio::authn::Payload; using istio::authn::Result; +using testing::_; using testing::DoAll; using testing::MockFunction; using testing::NiceMock; using testing::Return; using testing::SetArgPointee; using testing::StrictMock; -using testing::_; namespace Envoy { namespace Http { diff --git a/src/envoy/http/authn/peer_authenticator_test.cc b/src/envoy/http/authn/peer_authenticator_test.cc index d0cc95b6f6a..4db142a670e 100644 --- a/src/envoy/http/authn/peer_authenticator_test.cc +++ b/src/envoy/http/authn/peer_authenticator_test.cc @@ -26,13 +26,13 @@ namespace iaapi = istio::authentication::v1alpha1; using istio::authn::Payload; +using testing::_; using testing::DoAll; using testing::MockFunction; using testing::NiceMock; using testing::Return; using testing::SetArgPointee; using testing::StrictMock; -using testing::_; namespace Envoy { namespace Http { diff --git a/src/envoy/http/jwt_auth/jwt_authenticator_test.cc b/src/envoy/http/jwt_auth/jwt_authenticator_test.cc index ae090943251..f9b1661a396 100644 --- a/src/envoy/http/jwt_auth/jwt_authenticator_test.cc +++ b/src/envoy/http/jwt_auth/jwt_authenticator_test.cc @@ -22,9 +22,9 @@ using ::istio::envoy::config::filter::http::jwt_auth::v2alpha1:: JwtAuthentication; +using ::testing::_; using ::testing::Invoke; using ::testing::NiceMock; -using ::testing::_; namespace Envoy { namespace Http { diff --git a/src/envoy/http/jwt_auth/token_extractor_test.cc b/src/envoy/http/jwt_auth/token_extractor_test.cc index f4befee63b3..8c5dac0d69f 100644 --- a/src/envoy/http/jwt_auth/token_extractor_test.cc +++ b/src/envoy/http/jwt_auth/token_extractor_test.cc @@ -19,9 +19,9 @@ using ::istio::envoy::config::filter::http::jwt_auth::v2alpha1:: JwtAuthentication; +using ::testing::_; using ::testing::Invoke; using ::testing::NiceMock; -using ::testing::_; namespace Envoy { namespace Http { diff --git a/src/istio/api_spec/http_api_spec_parser_test.cc b/src/istio/api_spec/http_api_spec_parser_test.cc index ff7a409a066..db46b2acbef 100644 --- a/src/istio/api_spec/http_api_spec_parser_test.cc +++ b/src/istio/api_spec/http_api_spec_parser_test.cc @@ -27,8 +27,8 @@ using ::istio::mixer::v1::Attributes; using ::istio::mixer::v1::config::client::HTTPAPISpec; using ::istio::utils::AttributesBuilder; -using ::testing::Invoke; using ::testing::_; +using ::testing::Invoke; namespace istio { namespace api_spec { diff --git a/src/istio/control/http/attributes_builder_test.cc b/src/istio/control/http/attributes_builder_test.cc index fee1fb4ee61..396fa2c470a 100644 --- a/src/istio/control/http/attributes_builder_test.cc +++ b/src/istio/control/http/attributes_builder_test.cc @@ -28,8 +28,8 @@ using ::google::protobuf::util::MessageDifferencer; using ::istio::mixer::v1::Attributes; using ::istio::mixer::v1::Attributes_StringMap; -using ::testing::Invoke; using ::testing::_; +using ::testing::Invoke; namespace istio { namespace control { diff --git a/src/istio/control/http/request_handler_impl_test.cc b/src/istio/control/http/request_handler_impl_test.cc index f52300b9564..dcbbaf3d49f 100644 --- a/src/istio/control/http/request_handler_impl_test.cc +++ b/src/istio/control/http/request_handler_impl_test.cc @@ -35,8 +35,8 @@ using ::istio::mixerclient::MixerClient; using ::istio::mixerclient::TransportCheckFunc; using ::istio::quota_config::Requirement; -using ::testing::Invoke; using ::testing::_; +using ::testing::Invoke; namespace istio { namespace control { diff --git a/src/istio/control/tcp/attributes_builder_test.cc b/src/istio/control/tcp/attributes_builder_test.cc index d215ab8b8c7..52ee3a984a2 100644 --- a/src/istio/control/tcp/attributes_builder_test.cc +++ b/src/istio/control/tcp/attributes_builder_test.cc @@ -26,9 +26,9 @@ using ::google::protobuf::TextFormat; using ::google::protobuf::util::MessageDifferencer; +using ::testing::_; using ::testing::Invoke; using ::testing::Return; -using ::testing::_; namespace istio { namespace control { diff --git a/src/istio/control/tcp/request_handler_impl_test.cc b/src/istio/control/tcp/request_handler_impl_test.cc index 9f978b171ce..259fd06d7ce 100644 --- a/src/istio/control/tcp/request_handler_impl_test.cc +++ b/src/istio/control/tcp/request_handler_impl_test.cc @@ -31,8 +31,8 @@ using ::istio::mixerclient::MixerClient; using ::istio::mixerclient::TransportCheckFunc; using ::istio::quota_config::Requirement; -using ::testing::Invoke; using ::testing::_; +using ::testing::Invoke; namespace istio { namespace control { diff --git a/src/istio/mixerclient/client_impl_test.cc b/src/istio/mixerclient/client_impl_test.cc index f15022239ce..ee38af82753 100644 --- a/src/istio/mixerclient/client_impl_test.cc +++ b/src/istio/mixerclient/client_impl_test.cc @@ -27,8 +27,8 @@ using ::istio::mixer::v1::CheckRequest; using ::istio::mixer::v1::CheckResponse; using ::istio::mixerclient::CheckResponseInfo; using ::istio::quota_config::Requirement; -using ::testing::Invoke; using ::testing::_; +using ::testing::Invoke; namespace istio { namespace mixerclient { diff --git a/src/istio/mixerclient/quota_cache_test.cc b/src/istio/mixerclient/quota_cache_test.cc index 9d613db8874..9f691a3dd19 100644 --- a/src/istio/mixerclient/quota_cache_test.cc +++ b/src/istio/mixerclient/quota_cache_test.cc @@ -27,8 +27,8 @@ using ::istio::mixer::v1::CheckRequest; using ::istio::mixer::v1::CheckResponse; using ::istio::mixer::v1::ReferencedAttributes; using ::istio::quota_config::Requirement; -using ::testing::Invoke; using ::testing::_; +using ::testing::Invoke; namespace istio { namespace mixerclient { diff --git a/src/istio/mixerclient/report_batch_test.cc b/src/istio/mixerclient/report_batch_test.cc index aec33ab251b..8893d8e4535 100644 --- a/src/istio/mixerclient/report_batch_test.cc +++ b/src/istio/mixerclient/report_batch_test.cc @@ -23,8 +23,8 @@ using ::google::protobuf::util::error::Code; using ::istio::mixer::v1::Attributes; using ::istio::mixer::v1::ReportRequest; using ::istio::mixer::v1::ReportResponse; -using ::testing::Invoke; using ::testing::_; +using ::testing::Invoke; namespace istio { namespace mixerclient { From e72091d990ddc68f8457a212d3b82e31d6098005 Mon Sep 17 00:00:00 2001 From: Yangmin Zhu Date: Wed, 12 Sep 2018 11:53:35 -0700 Subject: [PATCH 3/3] fix format --- src/envoy/http/authn/http_filter_test.cc | 2 +- src/envoy/http/authn/origin_authenticator_test.cc | 2 +- src/envoy/http/authn/peer_authenticator_test.cc | 2 +- src/envoy/http/jwt_auth/jwt_authenticator_test.cc | 2 +- src/envoy/http/jwt_auth/token_extractor_test.cc | 2 +- src/istio/api_spec/http_api_spec_parser_test.cc | 2 +- src/istio/control/http/attributes_builder_test.cc | 2 +- src/istio/control/http/request_handler_impl_test.cc | 2 +- src/istio/control/tcp/attributes_builder_test.cc | 2 +- src/istio/control/tcp/request_handler_impl_test.cc | 2 +- src/istio/mixerclient/client_impl_test.cc | 2 +- src/istio/mixerclient/quota_cache_test.cc | 2 +- src/istio/mixerclient/report_batch_test.cc | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/envoy/http/authn/http_filter_test.cc b/src/envoy/http/authn/http_filter_test.cc index 07b08c40d06..4651d3b52f5 100644 --- a/src/envoy/http/authn/http_filter_test.cc +++ b/src/envoy/http/authn/http_filter_test.cc @@ -30,10 +30,10 @@ using Envoy::Http::Istio::AuthN::FilterContext; using istio::authn::Payload; using istio::authn::Result; using istio::envoy::config::filter::http::authn::v2alpha1::FilterConfig; -using testing::_; using testing::Invoke; using testing::NiceMock; using testing::StrictMock; +using testing::_; namespace iaapi = istio::authentication::v1alpha1; diff --git a/src/envoy/http/authn/origin_authenticator_test.cc b/src/envoy/http/authn/origin_authenticator_test.cc index e5f420fdaf1..8aeaa85215f 100644 --- a/src/envoy/http/authn/origin_authenticator_test.cc +++ b/src/envoy/http/authn/origin_authenticator_test.cc @@ -27,13 +27,13 @@ namespace iaapi = istio::authentication::v1alpha1; using istio::authn::Payload; using istio::authn::Result; -using testing::_; using testing::DoAll; using testing::MockFunction; using testing::NiceMock; using testing::Return; using testing::SetArgPointee; using testing::StrictMock; +using testing::_; namespace Envoy { namespace Http { diff --git a/src/envoy/http/authn/peer_authenticator_test.cc b/src/envoy/http/authn/peer_authenticator_test.cc index 4db142a670e..d0cc95b6f6a 100644 --- a/src/envoy/http/authn/peer_authenticator_test.cc +++ b/src/envoy/http/authn/peer_authenticator_test.cc @@ -26,13 +26,13 @@ namespace iaapi = istio::authentication::v1alpha1; using istio::authn::Payload; -using testing::_; using testing::DoAll; using testing::MockFunction; using testing::NiceMock; using testing::Return; using testing::SetArgPointee; using testing::StrictMock; +using testing::_; namespace Envoy { namespace Http { diff --git a/src/envoy/http/jwt_auth/jwt_authenticator_test.cc b/src/envoy/http/jwt_auth/jwt_authenticator_test.cc index f9b1661a396..ae090943251 100644 --- a/src/envoy/http/jwt_auth/jwt_authenticator_test.cc +++ b/src/envoy/http/jwt_auth/jwt_authenticator_test.cc @@ -22,9 +22,9 @@ using ::istio::envoy::config::filter::http::jwt_auth::v2alpha1:: JwtAuthentication; -using ::testing::_; using ::testing::Invoke; using ::testing::NiceMock; +using ::testing::_; namespace Envoy { namespace Http { diff --git a/src/envoy/http/jwt_auth/token_extractor_test.cc b/src/envoy/http/jwt_auth/token_extractor_test.cc index 8c5dac0d69f..f4befee63b3 100644 --- a/src/envoy/http/jwt_auth/token_extractor_test.cc +++ b/src/envoy/http/jwt_auth/token_extractor_test.cc @@ -19,9 +19,9 @@ using ::istio::envoy::config::filter::http::jwt_auth::v2alpha1:: JwtAuthentication; -using ::testing::_; using ::testing::Invoke; using ::testing::NiceMock; +using ::testing::_; namespace Envoy { namespace Http { diff --git a/src/istio/api_spec/http_api_spec_parser_test.cc b/src/istio/api_spec/http_api_spec_parser_test.cc index db46b2acbef..ff7a409a066 100644 --- a/src/istio/api_spec/http_api_spec_parser_test.cc +++ b/src/istio/api_spec/http_api_spec_parser_test.cc @@ -27,8 +27,8 @@ using ::istio::mixer::v1::Attributes; using ::istio::mixer::v1::config::client::HTTPAPISpec; using ::istio::utils::AttributesBuilder; -using ::testing::_; using ::testing::Invoke; +using ::testing::_; namespace istio { namespace api_spec { diff --git a/src/istio/control/http/attributes_builder_test.cc b/src/istio/control/http/attributes_builder_test.cc index 396fa2c470a..fee1fb4ee61 100644 --- a/src/istio/control/http/attributes_builder_test.cc +++ b/src/istio/control/http/attributes_builder_test.cc @@ -28,8 +28,8 @@ using ::google::protobuf::util::MessageDifferencer; using ::istio::mixer::v1::Attributes; using ::istio::mixer::v1::Attributes_StringMap; -using ::testing::_; using ::testing::Invoke; +using ::testing::_; namespace istio { namespace control { diff --git a/src/istio/control/http/request_handler_impl_test.cc b/src/istio/control/http/request_handler_impl_test.cc index dcbbaf3d49f..f52300b9564 100644 --- a/src/istio/control/http/request_handler_impl_test.cc +++ b/src/istio/control/http/request_handler_impl_test.cc @@ -35,8 +35,8 @@ using ::istio::mixerclient::MixerClient; using ::istio::mixerclient::TransportCheckFunc; using ::istio::quota_config::Requirement; -using ::testing::_; using ::testing::Invoke; +using ::testing::_; namespace istio { namespace control { diff --git a/src/istio/control/tcp/attributes_builder_test.cc b/src/istio/control/tcp/attributes_builder_test.cc index 52ee3a984a2..d215ab8b8c7 100644 --- a/src/istio/control/tcp/attributes_builder_test.cc +++ b/src/istio/control/tcp/attributes_builder_test.cc @@ -26,9 +26,9 @@ using ::google::protobuf::TextFormat; using ::google::protobuf::util::MessageDifferencer; -using ::testing::_; using ::testing::Invoke; using ::testing::Return; +using ::testing::_; namespace istio { namespace control { diff --git a/src/istio/control/tcp/request_handler_impl_test.cc b/src/istio/control/tcp/request_handler_impl_test.cc index 259fd06d7ce..9f978b171ce 100644 --- a/src/istio/control/tcp/request_handler_impl_test.cc +++ b/src/istio/control/tcp/request_handler_impl_test.cc @@ -31,8 +31,8 @@ using ::istio::mixerclient::MixerClient; using ::istio::mixerclient::TransportCheckFunc; using ::istio::quota_config::Requirement; -using ::testing::_; using ::testing::Invoke; +using ::testing::_; namespace istio { namespace control { diff --git a/src/istio/mixerclient/client_impl_test.cc b/src/istio/mixerclient/client_impl_test.cc index ee38af82753..f15022239ce 100644 --- a/src/istio/mixerclient/client_impl_test.cc +++ b/src/istio/mixerclient/client_impl_test.cc @@ -27,8 +27,8 @@ using ::istio::mixer::v1::CheckRequest; using ::istio::mixer::v1::CheckResponse; using ::istio::mixerclient::CheckResponseInfo; using ::istio::quota_config::Requirement; -using ::testing::_; using ::testing::Invoke; +using ::testing::_; namespace istio { namespace mixerclient { diff --git a/src/istio/mixerclient/quota_cache_test.cc b/src/istio/mixerclient/quota_cache_test.cc index 9f691a3dd19..9d613db8874 100644 --- a/src/istio/mixerclient/quota_cache_test.cc +++ b/src/istio/mixerclient/quota_cache_test.cc @@ -27,8 +27,8 @@ using ::istio::mixer::v1::CheckRequest; using ::istio::mixer::v1::CheckResponse; using ::istio::mixer::v1::ReferencedAttributes; using ::istio::quota_config::Requirement; -using ::testing::_; using ::testing::Invoke; +using ::testing::_; namespace istio { namespace mixerclient { diff --git a/src/istio/mixerclient/report_batch_test.cc b/src/istio/mixerclient/report_batch_test.cc index 8893d8e4535..aec33ab251b 100644 --- a/src/istio/mixerclient/report_batch_test.cc +++ b/src/istio/mixerclient/report_batch_test.cc @@ -23,8 +23,8 @@ using ::google::protobuf::util::error::Code; using ::istio::mixer::v1::Attributes; using ::istio::mixer::v1::ReportRequest; using ::istio::mixer::v1::ReportResponse; -using ::testing::_; using ::testing::Invoke; +using ::testing::_; namespace istio { namespace mixerclient {