Skip to content

Commit 58eb649

Browse files
committed
Remove unused return value from test helper.
1 parent 0864944 commit 58eb649

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

x/mongo/driver/integration/main_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,13 @@ func addCompressorToURI(uri string) string {
119119
return uri + "compressors=" + comp
120120
}
121121

122-
// runCommand runs an arbitrary command on a given database of target server
123-
func runCommand(s driver.Server, db string, cmd bsoncore.Document) (bsoncore.Document, error) {
122+
// runCommand runs an arbitrary command on a given database of the target
123+
// server.
124+
func runCommand(s driver.Server, db string, cmd bsoncore.Document) error {
124125
op := operation.NewCommand(cmd).
125-
Database(db).Deployment(driver.SingleServerDeployment{Server: s})
126-
err := op.Execute(context.Background())
127-
res := op.Result()
128-
return res, err
126+
Database(db).
127+
Deployment(driver.SingleServerDeployment{Server: s})
128+
return op.Execute(context.Background())
129129
}
130130

131131
// dropCollection drops the collection in the test cluster.

x/mongo/driver/integration/scram_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ func runScramAuthTest(t *testing.T, credential options.Credential) error {
147147
noerr(t, err)
148148

149149
cmd := bsoncore.BuildDocument(nil, bsoncore.AppendInt32Element(nil, "dbstats", 1))
150-
_, err = runCommand(server, integtest.DBName(t), cmd)
151-
return err
150+
return runCommand(server, integtest.DBName(t), cmd)
152151
}
153152

154153
func createScramUsers(t *testing.T, s driver.Server, cases []scramTestCase) error {
@@ -169,7 +168,7 @@ func createScramUsers(t *testing.T, s driver.Server, cases []scramTestCase) erro
169168
)),
170169
bsoncore.AppendArrayElement(nil, "mechanisms", bsoncore.BuildArray(nil, values...)),
171170
)
172-
_, err := runCommand(s, db, newUserCmd)
171+
err := runCommand(s, db, newUserCmd)
173172
if err != nil {
174173
return fmt.Errorf("Couldn't create user '%s' on db '%s': %w", c.username, integtest.DBName(t), err)
175174
}

0 commit comments

Comments
 (0)