Fixes travis failure by creating test DB earlier.
This commit is contained in:
parent
b895bf3d75
commit
8ee75233d4
2 changed files with 4 additions and 3 deletions
|
|
@ -1 +0,0 @@
|
|||
/Users/dom/projects/nimforum/forum.nim-lang.org/public/images/logo.png
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue