Add the ability to run the API forever when testing

This commit is contained in:
Arnau B
2020-10-22 16:01:56 +02:00
parent 23242fb945
commit 9971f13646
3 changed files with 9 additions and 1 deletions

View File

@@ -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

View File

@@ -1997,7 +1997,6 @@ components:
- Value
- Fnc
additionalProperties: false
example: {"Root":[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"Siblings":[0,1,2],"OldKey":[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"OldValue":[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"IsOld0":true,"Key":[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"Value":[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"Fnc":0}
balance:
$ref: '#/components/schemas/BigInt'
instantWithdrawn: