Skip to content

Commit

Permalink
test: fixes backup unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagotnunes committed Feb 1, 2021
1 parent bc7fb50 commit 8c34fc3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ public Backup.Builder answer(InvocationOnMock invocation) {
public void backup() {
Timestamp expireTime = Timestamp.now();
Database db = createDatabase();
db.backup(
Backup backup =
dbClient
.newBackupBuilder(BackupId.of("test-project", "test-instance", "test-backup"))
.setExpireTime(expireTime)
.build());
verify(dbClient).createBackup("test-instance", "test-backup", "database-1", expireTime);
.build();
db.backup(backup);
verify(dbClient).createBackup(backup.toBuilder().setDatabase(db.getId()).build());
}

@Test
Expand Down

0 comments on commit 8c34fc3

Please sign in to comment.