mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 11:26:44 +01:00
Add the ability to run the API forever when testing
This commit is contained in:
@@ -654,6 +654,13 @@ func TestMain(m *testing.M) {
|
||||
poolTxsToReceive: poolTxsToReceive,
|
||||
router: router,
|
||||
}
|
||||
// Fake server
|
||||
if os.Getenv("FAKE_SERVER") == "yes" {
|
||||
for {
|
||||
log.Info("Running fake server until ^C is received")
|
||||
time.Sleep(10 * time.Second)
|
||||
}
|
||||
}
|
||||
// Run tests
|
||||
result := m.Run()
|
||||
// Stop server
|
||||
|
||||
Reference in New Issue
Block a user