Skip to content

Commit

Permalink
test(bigtable): add UUID to avoid name collisions during test runs (#…
Browse files Browse the repository at this point in the history
…5747)

* fix: add UUID to avoid name collisions during test runs
  • Loading branch information
Eric Schmidt committed Mar 14, 2022
1 parent f2fc09f commit 853fe74
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bigtable/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1400,8 +1400,12 @@ func TestIntegration_BackupIAM(t *testing.T) {
if err := adminClient.CreateTable(ctx, table); err != nil {
t.Fatalf("Creating table: %v", err)
}

// Create backup.
backup := "backup"
opts := &uid.Options{Sep: '_'}
backupUUID := uid.NewSpace("backup", opts)
backup := backupUUID.New()

defer adminClient.DeleteBackup(ctx, cluster, backup)
if err = adminClient.CreateBackup(ctx, table, cluster, backup, time.Now().Add(8*time.Hour)); err != nil {
t.Fatalf("Creating backup: %v", err)
Expand Down

0 comments on commit 853fe74

Please sign in to comment.