Fix unit tests.

This commit is contained in:
Ben Johnson
2020-12-29 12:56:50 -07:00
parent 41448ceb89
commit 6f604e29b0
4 changed files with 16 additions and 17 deletions

4
db.go
View File

@@ -512,7 +512,7 @@ func (db *DB) Sync() (err error) {
changed = true
if err := db.checkpoint(info, forceCheckpoint); err != nil {
return fmt.Errorf("checkpoint: force=%v err=%w", err)
return fmt.Errorf("checkpoint: force=%v err=%w", forceCheckpoint, err)
}
}
@@ -1054,7 +1054,7 @@ func (db *DB) Restore(ctx context.Context, opt RestoreOptions) error {
tmpPath := outputPath + ".tmp"
// Copy snapshot to output path.
logger.Printf("restoring snapshot from %s://%s/%s to %s", r.Name(), generation, minWALIndex, tmpPath)
logger.Printf("restoring snapshot from %s://%s/%016x to %s", r.Name(), generation, minWALIndex, tmpPath)
if !opt.DryRun {
if err := db.restoreSnapshot(ctx, r, pos.Generation, pos.Index, tmpPath); err != nil {
return fmt.Errorf("cannot restore snapshot: %w", err)