Fixes travis failure by creating test DB earlier.

This commit is contained in:
Dominik Picheta 2018-05-22 22:21:59 +01:00
commit 8ee75233d4
2 changed files with 4 additions and 3 deletions

View file

@ -1 +0,0 @@
/Users/dom/projects/nimforum/forum.nim-lang.org/public/images/logo.png

View file

@ -21,8 +21,7 @@ const backend = "forum"
const port = 5000
const baseUrl = "http://localhost:" & $port & "/"
template withBackend(body: untyped): untyped =
## Starts a new backend instance with a fresh DB.
doAssert(execCmd("nimble testdb") == QuitSuccess)
## Starts a new backend instance.
spawn runProcess("nimble -y runbackend")
defer:
@ -51,6 +50,9 @@ when isMainModule:
defer:
discard execCmd("killall geckodriver")
# Create a fresh DB for the tester.
doAssert(execCmd("nimble testdb") == QuitSuccess)
doAssert(execCmd("nimble -y frontend") == QuitSuccess)
echo("Waiting for geckodriver to startup...")
sleep(5000)