Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nbackup_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ func WithDBTriggers() NBackupOption {

func WithInPlaceRestore() NBackupOption {
return func(opts *NBackupOptions) {
opts.InPlaceRestore = false
opts.InPlaceRestore = true
}
}

func WithPlaceRestore() NBackupOption {
return func(opts *NBackupOptions) {
opts.InPlaceRestore = true
opts.InPlaceRestore = false
}
}

Expand Down
2 changes: 1 addition & 1 deletion nbackup_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func TestNBackupOptions(t *testing.T) {
assert.Equal(t, int32(-1), opts.Level)
assert.Equal(t, "", opts.Guid)
assert.Equal(t, int32(0), opts.GetOptionsMask())
opts = NewNBackupOptions(WithLevel(1), WithGuid("abc"), WithDBTriggers(), WithPlaceRestore(), WithPreserveSequence())
opts = NewNBackupOptions(WithLevel(1), WithGuid("abc"), WithDBTriggers(), WithInPlaceRestore(), WithPreserveSequence())
assert.Equal(t, int32(1), opts.Level)
assert.Equal(t, "abc", opts.Guid)
assert.Equal(t, int32(6), opts.GetOptionsMask())
Expand Down