File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -186,8 +186,9 @@ StatusOr<ListBucketsResponse> RestStub::ListBuckets(
186186 if (!request.page_token ().empty ()) {
187187 builder.AddQueryParameter (" pageToken" , request.page_token ());
188188 }
189- builder.AddQueryParameter (" returnPartialSuccess" ,
190- (request.return_partial_success () ? " 1" : " 0" ));
189+ builder.AddQueryParameter (
190+ " returnPartialSuccess" ,
191+ (request.return_partial_success () ? " true" : " false" ));
191192 return ParseFromRestResponse<ListBucketsResponse>(
192193 storage_rest_client_->Get (context, std::move (builder).BuildRequest ()));
193194}
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ using ::google::cloud::storage::testing::AclEntityNames;
3838using ::google::cloud::testing_util::IsOk;
3939using ::google::cloud::testing_util::StatusIs;
4040using ::testing::Contains;
41+ using ::testing::HasSubstr;
4142using ::testing::IsEmpty;
4243using ::testing::IsSubsetOf;
4344using ::testing::Not;
@@ -700,7 +701,7 @@ TEST_F(BucketIntegrationTest, ListPartialSuccess) {
700701
701702 std::vector<std::string> names;
702703 std::vector<std::string> unreachable;
703- for (auto & r : client.ListBucketsPartial ()) {
704+ for (auto & r : client.ListBucketsPartial (ReturnPartialSuccess ( true ) )) {
704705 EXPECT_STATUS_OK (r);
705706 if (!r) break ;
706707 for (auto const & b : r->buckets ) {
@@ -711,7 +712,7 @@ TEST_F(BucketIntegrationTest, ListPartialSuccess) {
711712 }
712713
713714 EXPECT_THAT (names, Contains (bucket_name));
714- EXPECT_THAT (unreachable, Contains (unreachable_bucket_name));
715+ EXPECT_THAT (unreachable, Contains (HasSubstr ( unreachable_bucket_name) ));
715716}
716717
717718TEST_F (BucketIntegrationTest, CreateFailure) {
You can’t perform that action at this time.
0 commit comments