Skip to content

Commit a2299db

Browse files
authored
fix main lint error (#188)
1 parent 0fccc9b commit a2299db

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

itests/harmonydb_test.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import (
77
"fmt"
88
"testing"
99

10+
"github.com/stretchr/testify/require"
11+
1012
"github.com/filecoin-project/curio/harmony/harmonydb"
1113

1214
"github.com/filecoin-project/lotus/itests/kit"
@@ -67,11 +69,12 @@ func TestTransaction(t *testing.T) {
6769

6870
withSetup(t, func(miner *kit.TestMiner) {
6971
testID := harmonydb.ITestNewID()
70-
cdb := setupTestDB(t, testID)
72+
cdb, err := harmonydb.NewFromConfigWithITestID(t, testID)
73+
require.NoError(t, err)
7174
if _, err := cdb.Exec(ctx, "INSERT INTO itest_scratch (some_int) VALUES (4), (5), (6)"); err != nil {
7275
t.Fatal("E0", err)
7376
}
74-
_, err := cdb.BeginTransaction(ctx, func(tx *harmonydb.Tx) (commit bool, err error) {
77+
_, err = cdb.BeginTransaction(ctx, func(tx *harmonydb.Tx) (commit bool, err error) {
7578
if _, err := tx.Exec("INSERT INTO itest_scratch (some_int) VALUES (7), (8), (9)"); err != nil {
7679
t.Fatal("E1", err)
7780
}
@@ -129,7 +132,8 @@ func TestPartialWalk(t *testing.T) {
129132

130133
withSetup(t, func(miner *kit.TestMiner) {
131134
testID := harmonydb.ITestNewID()
132-
cdb := setupTestDB(t, testID)
135+
cdb, err := harmonydb.NewFromConfigWithITestID(t, testID)
136+
require.NoError(t, err)
133137
if _, err := cdb.Exec(ctx, `
134138
INSERT INTO
135139
itest_scratch (content, some_int)

0 commit comments

Comments
 (0)