Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xinran chen committed Jul 11, 2023
1 parent 18b332a commit b443aa9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion miner-api/test/prover_task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"scroll-tech/common/database"
"scroll-tech/common/docker"
"scroll-tech/common/types"
"scroll-tech/database/migrate"
"scroll-tech/miner-api/cmd/app"
"scroll-tech/miner-api/internal/config"
"scroll-tech/miner-api/internal/orm"
Expand Down Expand Up @@ -105,11 +106,14 @@ var (
)

func insertSomeProverTasks(t *testing.T, db *gorm.DB) {
err := db.AutoMigrate(new(orm.ProverTask))
sqlDB, err := db.DB()
assert.NoError(t, err)
assert.NoError(t, migrate.ResetDB(sqlDB))

ptdb := orm.NewProverTask(db)
err = ptdb.SetProverTask(context.Background(), &task1)
assert.NoError(t, err)

err = ptdb.SetProverTask(context.Background(), &task2)
assert.NoError(t, err)
}

0 comments on commit b443aa9

Please sign in to comment.