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 port = 5000
|
||||||
const baseUrl = "http://localhost:" & $port & "/"
|
const baseUrl = "http://localhost:" & $port & "/"
|
||||||
template withBackend(body: untyped): untyped =
|
template withBackend(body: untyped): untyped =
|
||||||
## Starts a new backend instance with a fresh DB.
|
## Starts a new backend instance.
|
||||||
doAssert(execCmd("nimble testdb") == QuitSuccess)
|
|
||||||
|
|
||||||
spawn runProcess("nimble -y runbackend")
|
spawn runProcess("nimble -y runbackend")
|
||||||
defer:
|
defer:
|
||||||
|
|
@ -51,6 +50,9 @@ when isMainModule:
|
||||||
defer:
|
defer:
|
||||||
discard execCmd("killall geckodriver")
|
discard execCmd("killall geckodriver")
|
||||||
|
|
||||||
|
# Create a fresh DB for the tester.
|
||||||
|
doAssert(execCmd("nimble testdb") == QuitSuccess)
|
||||||
|
|
||||||
doAssert(execCmd("nimble -y frontend") == QuitSuccess)
|
doAssert(execCmd("nimble -y frontend") == QuitSuccess)
|
||||||
echo("Waiting for geckodriver to startup...")
|
echo("Waiting for geckodriver to startup...")
|
||||||
sleep(5000)
|
sleep(5000)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue