Skip to content

Commit

Permalink
fix unittest and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
joanestebanr committed Feb 15, 2024
1 parent 61080b6 commit 14537f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions db/pgstorage/migrations/0008_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ func (m migrationTest0008) InsertData(db *sql.DB) error {
}

func (m migrationTest0008) RunAssertsAfterMigrationUp(t *testing.T, db *sql.DB) {

queryDepositCount := "select orig_net,dest_net from sync.deposit where id = 1;"
row := db.QueryRow(queryDepositCount)
var origNet, destNet uint32
Expand Down Expand Up @@ -122,7 +121,6 @@ func (m migrationTest0008) RunAssertsAfterMigrationDown(t *testing.T, db *sql.DB
row = db.QueryRow(queryClaim)
assert.NoError(t, row.Scan(&origNet))
assert.Equal(t, int(1234), origNet)

}

func TestMigration0008(t *testing.T) {
Expand Down
5 changes: 5 additions & 0 deletions db/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ func TestInsertDeposit(t *testing.T) {
tx, err := pg.BeginDBTransaction(ctx)
require.NoError(t, err)

_, err = pg.AddBlock(ctx, &etherman.Block{
BlockNumber: 1,
}, tx)
require.NoError(t, err)
deposit := &etherman.Deposit{
NetworkID: 1,
OriginalNetwork: 4294967295,
Expand All @@ -35,6 +39,7 @@ func TestInsertDeposit(t *testing.T) {
BlockNumber: 1,
BlockID: 1,
DepositCount: 1,
Metadata: common.FromHex("0x00"),
}
_, err = pg.AddDeposit(ctx, deposit, tx)
require.NoError(t, err)
Expand Down

0 comments on commit 14537f2

Please sign in to comment.