Skip to content

Commit 118356f

Browse files
authored
ci(bigtable): update table backup test (#16009)
1 parent 3f58537 commit 118356f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

google/cloud/bigtable/tests/table_admin_backup_integration_test.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ TEST_F(AdminBackupIntegrationTest, CreateListGetUpdateRestoreDeleteBackup) {
8181

8282
google::bigtable::admin::v2::Backup b;
8383
*b.mutable_expire_time() = ToProtoTimestamp(expire_time);
84+
b.set_source_table(table_name);
8485
auto backup = table_admin_
8586
->CreateBackup(bigtable::ClusterName(
8687
project_id(), instance_id(), cluster_id),
@@ -91,7 +92,7 @@ TEST_F(AdminBackupIntegrationTest, CreateListGetUpdateRestoreDeleteBackup) {
9192
EXPECT_EQ(backup->name(), backup_name);
9293

9394
// List backups to verify new backup has been created
94-
auto backups = table_admin_->ListBackups(table_name);
95+
auto backups = table_admin_->ListBackups(cluster_name);
9596
std::vector<google::bigtable::admin::v2::Backup> backups_list;
9697
for (auto& b : backups) {
9798
ASSERT_STATUS_OK(b);
@@ -121,7 +122,7 @@ TEST_F(AdminBackupIntegrationTest, CreateListGetUpdateRestoreDeleteBackup) {
121122
IsProtoEqual(ToProtoTimestamp(expire_time)));
122123

123124
// Delete table
124-
EXPECT_STATUS_OK(table_admin_->DeleteTable(table_id));
125+
EXPECT_STATUS_OK(table_admin_->DeleteTable(table_name));
125126

126127
// Verify the delete
127128
google::bigtable::admin::v2::ListTablesRequest list_request;
@@ -140,7 +141,7 @@ TEST_F(AdminBackupIntegrationTest, CreateListGetUpdateRestoreDeleteBackup) {
140141
restore_request.set_parent(
141142
bigtable::InstanceName(project_id(), instance_id()));
142143
restore_request.set_backup(backup_name);
143-
restore_request.set_table_id(table_name);
144+
restore_request.set_table_id(table_id);
144145
auto table = table_admin_->RestoreTable(restore_request).get();
145146
EXPECT_STATUS_OK(table);
146147

0 commit comments

Comments
 (0)