Skip to content

Commit f5e7af9

Browse files
committed
Fix reviewdog suggestions
1 parent 81a8635 commit f5e7af9

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

pbm/oplog/restore_test.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func (d *mdbTestClient) applyOps(entries []interface{}) error {
7171

7272
func TestIsOpForCloning(t *testing.T) {
7373
oRestore := newOplogRestoreTest(&mdbTestClient{})
74-
oRestore.SetCloneNS(context.Background(), snapshot.CloneNS{FromNS: "mydb.cloningFrom", ToNS: "mydb.cloningTo"})
74+
_ = oRestore.SetCloneNS(context.Background(), snapshot.CloneNS{FromNS: "mydb.cloningFrom", ToNS: "mydb.cloningTo"})
7575

7676
testCases := []struct {
7777
desc string
@@ -136,7 +136,6 @@ func TestIsOpForCloning(t *testing.T) {
136136
if res != tC.isForCloning {
137137
t.Errorf("%s: for entry: %+v isOpForCloning is: %t, but it should be opposite",
138138
tC.desc, tC.entry, tC.isForCloning)
139-
140139
}
141140
})
142141
}
@@ -160,7 +159,7 @@ func TestApply(t *testing.T) {
160159
resCmd: []string{"drop", "create", "drop", "drop", "create"},
161160
resColl: []string{"c1", "c1", "c1", "c2", "c2"},
162161
},
163-
//todo: add more cases
162+
// todo: add more cases
164163
}
165164
for _, tC := range testCases {
166165
t.Run(tC.desc, func(t *testing.T) {
@@ -206,7 +205,7 @@ func TestApply(t *testing.T) {
206205
})
207206

208207
t.Run("selective restore", func(t *testing.T) {
209-
//todo:
208+
// todo: add tests
210209
})
211210

212211
t.Run("index restore", func(t *testing.T) {
@@ -224,7 +223,7 @@ func TestApply(t *testing.T) {
224223
coll: "c1",
225224
idxs: bson.D{{"fieldX", -1}, {"fieldZ", -1}},
226225
},
227-
//todo: add more cases
226+
// todo: add more cases
228227
}
229228
for _, tC := range testCases {
230229
t.Run(tC.desc, func(t *testing.T) {
@@ -269,7 +268,7 @@ func TestApply(t *testing.T) {
269268
resNS: []string{"mydb.c1_clone", "mydb.c1_clone", "mydb.c1_clone"},
270269
},
271270
{
272-
desc: "ignore namespaces not relevent for cloning",
271+
desc: "ignore namespaces not relevant for cloning",
273272
oplogFile: "ops_i_u_d",
274273
nsFrom: "mydb.xyz",
275274
nsTo: "mydb.xyz_clone",
@@ -290,7 +289,7 @@ func TestApply(t *testing.T) {
290289
t.Run(tC.desc, func(t *testing.T) {
291290
db := newMDBTestClient()
292291
oRestore := newOplogRestoreTest(db)
293-
oRestore.SetCloneNS(context.Background(), snapshot.CloneNS{FromNS: tC.nsFrom, ToNS: tC.nsTo})
292+
_ = oRestore.SetCloneNS(context.Background(), snapshot.CloneNS{FromNS: tC.nsFrom, ToNS: tC.nsTo})
294293

295294
fr := useTestFile(t, tC.oplogFile)
296295

0 commit comments

Comments
 (0)