mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 11:26:44 +01:00
Fix time sensitive test
This commit is contained in:
@@ -191,7 +191,7 @@ func TestMain(m *testing.M) {
|
||||
// Swagger
|
||||
router := swagger.NewRouter().WithSwaggerFromFile("./swagger.yml")
|
||||
// HistoryDB
|
||||
pass := "yourpasswordhere" // os.Getenv("POSTGRES_PASS")
|
||||
pass := os.Getenv("POSTGRES_PASS")
|
||||
|
||||
database, err := db.InitSQLDB(5432, "localhost", "hermez", pass, "hermez")
|
||||
if err != nil {
|
||||
|
||||
@@ -170,7 +170,7 @@ func assertTx(t *testing.T, expected, actual *common.PoolL2Tx) {
|
||||
token := tokens[expected.TokenID]
|
||||
// If the token has value in USD setted
|
||||
if token.USDUpdate != nil {
|
||||
assert.Equal(t, token.USDUpdate.Unix(), actual.AbsoluteFeeUpdate.Unix())
|
||||
assert.Less(t, token.USDUpdate.Unix()-3, actual.AbsoluteFeeUpdate.Unix())
|
||||
expected.AbsoluteFeeUpdate = actual.AbsoluteFeeUpdate
|
||||
// Set expected fee
|
||||
f := new(big.Float).SetInt(expected.Amount)
|
||||
|
||||
Reference in New Issue
Block a user