@@ -25,7 +25,6 @@ namespace rest_internal {
2525GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2626namespace {
2727
28- using ::testing::Contains;
2928using ::testing::ElementsAre;
3029using ::testing::Pair;
3130using ::testing::UnorderedElementsAre;
@@ -53,7 +52,6 @@ TEST(RestContextTest, SetMetadataFull) {
5352 Options{}
5453 .set <UserProjectOption>(" user-project" )
5554 .set <QuotaUserOption>(" quota-user" )
56- .set <ApiKeyOption>(" api-key" )
5755 .set <FieldMaskOption>(" items.name,token" )
5856 .set <ServerTimeoutOption>(std::chrono::milliseconds (1050 ))
5957 .set <CustomHeadersOption>(
@@ -65,21 +63,12 @@ TEST(RestContextTest, SetMetadataFull) {
6563 Pair (" x-goog-request-params" , ElementsAre (" p1=v1&p2=v2" )),
6664 Pair (" x-goog-user-project" , ElementsAre (" user-project" )),
6765 Pair (" x-goog-quota-user" , ElementsAre (" quota-user" )),
68- Pair (" x-goog-api-key" , ElementsAre (" api-key" )),
6966 Pair (" x-goog-fieldmask" , ElementsAre (" items.name,token" )),
7067 Pair (" x-server-timeout" , ElementsAre (" 1.050" )),
7168 Pair (" custom-header-1" , ElementsAre (" v1" )),
7269 Pair (" custom-header-2" , ElementsAre (" v2" ))));
7370}
7471
75- TEST (RestContextTest, Regression14745) {
76- RestContext lhs;
77- SetMetadata (lhs, Options{}.set <ApiKeyOption>(" api-key" ), {},
78- " api-client-header" );
79- EXPECT_THAT (lhs.headers (),
80- Contains (Pair (" x-goog-api-key" , ElementsAre (" api-key" ))));
81- }
82-
8372} // namespace
8473GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
8574} // namespace rest_internal
0 commit comments