FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ci(spanner): update graph samples to use enterprise instances by scotthart · Pull Request #14757 · googleapis/google-cloud-cpp · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cc  (4) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ TEST_F(BackupExtraIntegrationTest, CreateBackupWithVersionTime) {

/// @test Verify creating a backup with an expired version_time fails.
TEST_F(BackupExtraIntegrationTest, CreateBackupWithExpiredVersionTime) {
auto instance_id =
spanner_testing::PickRandomInstance(generator_, ProjectId());
auto instance_id = spanner_testing::PickRandomInstance(
generator_, ProjectId(), "NOT labels.edition:enterprise");
ASSERT_THAT(instance_id, IsOk());
Instance in(ProjectId(), *instance_id);
Database db(in, spanner_testing::RandomDatabaseName(generator_));
Expand Down Expand Up @@ -333,8 +333,8 @@ TEST_F(BackupExtraIntegrationTest, CreateBackupWithExpiredVersionTime) {

/// @test Verify creating a backup with a future version_time fails.
TEST_F(BackupExtraIntegrationTest, CreateBackupWithFutureVersionTime) {
auto instance_id =
spanner_testing::PickRandomInstance(generator_, ProjectId());
auto instance_id = spanner_testing::PickRandomInstance(
generator_, ProjectId(), "NOT labels.edition:enterprise");
ASSERT_THAT(instance_id, IsOk());
Instance in(ProjectId(), *instance_id);
Database db(in, spanner_testing::RandomDatabaseName(generator_));
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ TEST_F(BackupExtraIntegrationTest, BackupRestoreWithVersionTime) {

/// @test Verify creating a backup with an expired version_time fails.
TEST_F(BackupExtraIntegrationTest, BackupWithExpiredVersionTime) {
auto instance_id =
spanner_testing::PickRandomInstance(generator_, ProjectId());
auto instance_id = spanner_testing::PickRandomInstance(
generator_, ProjectId(), "NOT labels.edition:enterprise");
ASSERT_THAT(instance_id, IsOk());
Instance in(ProjectId(), *instance_id);
Database db(in, spanner_testing::RandomDatabaseName(generator_));
Expand Down Expand Up @@ -273,8 +273,8 @@ TEST_F(BackupExtraIntegrationTest, BackupWithExpiredVersionTime) {

/// @test Verify creating a backup with a future version_time fails.
TEST_F(BackupExtraIntegrationTest, BackupWithFutureVersionTime) {
auto instance_id =
spanner_testing::PickRandomInstance(generator_, ProjectId());
auto instance_id = spanner_testing::PickRandomInstance(
generator_, ProjectId(), "NOT labels.edition:enterprise");
ASSERT_THAT(instance_id, IsOk());
Instance in(ProjectId(), *instance_id);
Database db(in, spanner_testing::RandomDatabaseName(generator_));
Expand Down
3 changes: 1 addition & 2 deletions google/cloud/spanner/samples/graph_samples.cc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,7 @@ int RunAll(bool emulator) {
}

auto random_instance = google::cloud::spanner_testing::PickRandomInstance(
generator, project_id,
"labels.samples:yes AND NOT name:/instances/test-instance-mr-");
generator, project_id, "labels.edition:enterprise");
if (!random_instance) {
throw std::runtime_error("Cannot find an instance to run the samples: " +
random_instance.status().message());
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ void DatabaseIntegrationTest::SetUpTestSuite() {

auto project_id = internal::GetEnv("GOOGLE_CLOUD_PROJECT").value_or("");
ASSERT_FALSE(project_id.empty());
auto instance_id = PickRandomInstance(*generator_, project_id);
auto instance_id = PickRandomInstance(*generator_, project_id,
"NOT labels.edition:enterprise");
ASSERT_THAT(instance_id, IsOk());
auto database_id = RandomDatabaseName(*generator_);
db_ = new spanner::Database(project_id, *instance_id, database_id);
Expand Down Expand Up @@ -198,7 +199,8 @@ void PgDatabaseIntegrationTest::SetUpTestSuite() {

auto project_id = internal::GetEnv("GOOGLE_CLOUD_PROJECT").value_or("");
ASSERT_FALSE(project_id.empty());
auto instance_id = PickRandomInstance(*generator_, project_id);
auto instance_id = PickRandomInstance(*generator_, project_id,
"NOT labels.edition:enterprise");
ASSERT_THAT(instance_id, IsOk());
auto database_id = RandomDatabaseName(*generator_);
db_ = new spanner::Database(project_id, *instance_id, database_id);
Expand Down

Back | FazBrowse Home | New Git URL