def test_restore_database(capsys):
    backup_sample.restore_database(INSTANCE_ID, RESTORE_DB_ID, BACKUP_ID)
    out, _ = capsys.readouterr()
    assert (DATABASE_ID + " restored to ") in out
    assert (RESTORE_DB_ID + " from backup ") in out
    assert BACKUP_ID in out
Esempio n. 2
0
def test_restore_database(capsys, instance_id, sample_database):
    backup_sample.restore_database(instance_id, RESTORE_DB_ID, BACKUP_ID)
    out, _ = capsys.readouterr()
    assert (sample_database.database_id + " restored to ") in out
    assert (RESTORE_DB_ID + " from backup ") in out
    assert BACKUP_ID in out