Skip to content

Commit 68edf95

Browse files
committed
Fix CI failure
1 parent a6d928f commit 68edf95

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

google/cloud/storage/internal/rest/stub.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

google/cloud/storage/tests/bucket_integration_test.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ using ::google::cloud::storage::testing::AclEntityNames;
3838
using ::google::cloud::testing_util::IsOk;
3939
using ::google::cloud::testing_util::StatusIs;
4040
using ::testing::Contains;
41+
using ::testing::HasSubstr;
4142
using ::testing::IsEmpty;
4243
using ::testing::IsSubsetOf;
4344
using ::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

717718
TEST_F(BucketIntegrationTest, CreateFailure) {

0 commit comments

Comments
 (0)