diff --git a/google/cloud/spanner/integration_tests/client_integration_test.cc b/google/cloud/spanner/integration_tests/client_integration_test.cc index 29077292f756b..2c114ca56f18b 100644 --- a/google/cloud/spanner/integration_tests/client_integration_test.cc +++ b/google/cloud/spanner/integration_tests/client_integration_test.cc @@ -805,7 +805,10 @@ TEST_F(ClientIntegrationTest, ReadLockModeOptionIsSent) { auto tx_a_read_result = client_->Read( tx_a, "Singers", KeySet().AddKey(MakeKey(singer_id)), {"SingerId"}); for (auto const& row : StreamOf>(tx_a_read_result)) { - EXPECT_STATUS_OK(row); + EXPECT_THAT( + row, + AnyOf(IsOk(), StatusIs(StatusCode::kUnimplemented, + HasSubstr("Optimistic lock is not enabled")))); } tx_a = MakeReadWriteTransaction( tx_a, Transaction::ReadWriteOptions(read_lock_mode)); @@ -813,7 +816,10 @@ TEST_F(ClientIntegrationTest, ReadLockModeOptionIsSent) { auto optimistic_result = client_->Commit(tx_a, mutation_helper("SecondModifiedName")); - EXPECT_STATUS_OK(optimistic_result); + EXPECT_THAT( + optimistic_result, + AnyOf(IsOk(), StatusIs(StatusCode::kUnimplemented, + HasSubstr("Optimistic lock is not enabled")))); } /// @test Test ExecuteQuery() with bounded staleness set by a timestamp. diff --git a/google/cloud/storage/examples/storage_bucket_iam_samples.cc b/google/cloud/storage/examples/storage_bucket_iam_samples.cc index 13db584e8cc57..e7a40f4b931e1 100644 --- a/google/cloud/storage/examples/storage_bucket_iam_samples.cc +++ b/google/cloud/storage/examples/storage_bucket_iam_samples.cc @@ -328,8 +328,9 @@ void RunAll(std::vector const& argv) { client, {bucket_name, "roles/storage.objectViewer", condition_title, condition_description, condition_expression}); - std::cout << "\nRunning NativeSetBucketPublicIam() example" << std::endl; - NativeSetBucketPublicIam(client, {bucket_name}); + // TODO(#15854): Enable this test when the issue is resolved. + // std::cout << "\nRunning NativeSetBucketPublicIam() example" << std::endl; + // NativeSetBucketPublicIam(client, {bucket_name}); if (!examples::UsingEmulator()) std::this_thread::sleep_until(pause); (void)examples::RemoveBucketAndContents(client, bucket_name); diff --git a/google/cloud/storage/tests/bucket_acl_integration_test.cc b/google/cloud/storage/tests/bucket_acl_integration_test.cc index eff5a62caa675..b42a03e3ac654 100644 --- a/google/cloud/storage/tests/bucket_acl_integration_test.cc +++ b/google/cloud/storage/tests/bucket_acl_integration_test.cc @@ -154,6 +154,8 @@ TEST_F(BucketAclIntegrationTest, AclCRUD) { } TEST_F(BucketAclIntegrationTest, CreatePredefinedAcl) { + // TODO(#15854): Enable this test when the issue is resolved. + if (!UsingEmulator()) GTEST_SKIP(); std::vector test_values{ PredefinedAcl::AuthenticatedRead(), PredefinedAcl::Private(), PredefinedAcl::ProjectPrivate(), PredefinedAcl::PublicRead(), diff --git a/google/cloud/storage/tests/bucket_integration_test.cc b/google/cloud/storage/tests/bucket_integration_test.cc index 81ab844176b9f..01509bc547546 100644 --- a/google/cloud/storage/tests/bucket_integration_test.cc +++ b/google/cloud/storage/tests/bucket_integration_test.cc @@ -226,6 +226,8 @@ TEST_F(BucketIntegrationTest, PatchLifecycleConditions) { } TEST_F(BucketIntegrationTest, FullPatch) { + // TODO(#15854): Enable this test when the issue is resolved. + if (!UsingEmulator()) GTEST_SKIP(); std::string bucket_name = MakeRandomBucketName(); auto client = MakeBucketIntegrationTestClient(); @@ -561,6 +563,8 @@ TEST_F(BucketIntegrationTest, GetMetadataIfMetagenerationNotMatchFailure) { } TEST_F(BucketIntegrationTest, NativeIamCRUD) { + // TODO(#15854): Enable this test when the issue is resolved. + if (!UsingEmulator()) GTEST_SKIP(); std::string bucket_name = MakeRandomBucketName(); auto client = MakeBucketIntegrationTestClient(); diff --git a/google/cloud/storage/tests/default_object_acl_integration_test.cc b/google/cloud/storage/tests/default_object_acl_integration_test.cc index cf56260a5d045..7bb812d2b9519 100644 --- a/google/cloud/storage/tests/default_object_acl_integration_test.cc +++ b/google/cloud/storage/tests/default_object_acl_integration_test.cc @@ -53,6 +53,8 @@ class DefaultObjectAclIntegrationTest }; TEST_F(DefaultObjectAclIntegrationTest, AclCRUD) { + // TODO(#15854): Enable this test when the issue is resolved. + if (!UsingEmulator()) GTEST_SKIP(); std::string bucket_name = MakeRandomBucketName(); auto client = MakeIntegrationTestClient(MakeBucketTestOptions()); @@ -157,6 +159,8 @@ TEST_F(DefaultObjectAclIntegrationTest, AclCRUD) { } TEST_F(DefaultObjectAclIntegrationTest, CreatePredefinedDefaultObjectAcl) { + // TODO(#15854): Enable this test when the issue is resolved. + if (!UsingEmulator()) GTEST_SKIP(); std::vector test_values{ PredefinedDefaultObjectAcl::AuthenticatedRead(), PredefinedDefaultObjectAcl::BucketOwnerFullControl(),