Skip to content

Commit c1e04c9

Browse files
committed
Fix typos
1 parent 3d74bc0 commit c1e04c9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

pbm/restore/physical.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ func (r *PhysRestore) close(noerr, cleanup bool) {
248248
}
249249
} else if cleanup { // clean-up dbpath on err if needed (cluster is done or partlyDone)
250250
r.log.Debug("clean-up dbpath")
251-
err := removeAll(r.dbpath, r.log, getInternlLogFileSkipRule())
251+
err := removeAll(r.dbpath, r.log, getInternalLogFileSkipRule())
252252
if err != nil {
253253
r.log.Error("flush dbpath %s: %v", r.dbpath, err)
254254
}
@@ -402,7 +402,7 @@ func (r *PhysRestore) migrateDBDirToFallbackDir() error {
402402
// moves all content from fallback path.
403403
func (r *PhysRestore) migrateFromFallbackDirToDBDir() error {
404404
r.log.Debug("clean-up dbpath")
405-
err := removeAll(r.dbpath, r.log, getFallbackSyncFileSkipRule(), getInternlLogFileSkipRule())
405+
err := removeAll(r.dbpath, r.log, getFallbackSyncFileSkipRule(), getInternalLogFileSkipRule())
406406
if err != nil {
407407
r.log.Error("flush dbpath %s: %v", r.dbpath, err)
408408
return errors.Wrap(err, "remove all from dbpath")
@@ -2665,7 +2665,7 @@ func isFileToSkip(f string, skipRules ...fileSkipRule) bool {
26652665
return false
26662666
}
26672667

2668-
func getInternlLogFileSkipRule() fileSkipRule {
2668+
func getInternalLogFileSkipRule() fileSkipRule {
26692669
return func(f string) bool {
26702670
return isInternalMongoLog(f)
26712671
}

pbm/restore/physical_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,10 @@ func TestRemoveAll(t *testing.T) {
198198
}
199199
})
200200

201-
t.Run("skiping internal mongod log files", func(t *testing.T) {
201+
t.Run("skipping internal mongod log files", func(t *testing.T) {
202202
tmpDir := setupTestFiles(t)
203203

204-
err := removeAll(tmpDir, log.DiscardEvent, getInternlLogFileSkipRule())
204+
err := removeAll(tmpDir, log.DiscardEvent, getInternalLogFileSkipRule())
205205
if err != nil {
206206
t.Fatalf("got error when removing all files, err=%v", err)
207207
}
@@ -212,7 +212,7 @@ func TestRemoveAll(t *testing.T) {
212212
}
213213
})
214214

215-
t.Run("skiping fallback dir", func(t *testing.T) {
215+
t.Run("skipping fallback dir", func(t *testing.T) {
216216
tmpDir := setupTestFiles(t)
217217

218218
err := removeAll(tmpDir, log.DiscardEvent, getFallbackSyncFileSkipRule())
@@ -231,10 +231,10 @@ func TestRemoveAll(t *testing.T) {
231231
}
232232
})
233233

234-
t.Run("skiping all pbm related", func(t *testing.T) {
234+
t.Run("skipping all pbm related", func(t *testing.T) {
235235
tmpDir := setupTestFiles(t)
236236

237-
err := removeAll(tmpDir, log.DiscardEvent, getFallbackSyncFileSkipRule(), getInternlLogFileSkipRule())
237+
err := removeAll(tmpDir, log.DiscardEvent, getFallbackSyncFileSkipRule(), getInternalLogFileSkipRule())
238238
if err != nil {
239239
t.Fatalf("got error when removing all files, err=%v", err)
240240
}

0 commit comments

Comments
 (0)