lemmy-server: fix tests by waiting until backend is ready with 10s timeout
This commit is contained in:
parent
13fae6142c
commit
80861fb032
|
@ -51,7 +51,8 @@ in
|
||||||
|
|
||||||
with subtest("the backend starts and responds"):
|
with subtest("the backend starts and responds"):
|
||||||
server.wait_for_open_port(${toString backendPort})
|
server.wait_for_open_port(${toString backendPort})
|
||||||
server.succeed("curl --fail localhost:${toString backendPort}/api/v3/site")
|
# wait until succeeds, it just needs few seconds for migrations, but lets give it 10s max
|
||||||
|
server.wait_until_succeeds("curl --fail localhost:${toString backendPort}/api/v3/site", 10)
|
||||||
|
|
||||||
with subtest("the UI starts and responds"):
|
with subtest("the UI starts and responds"):
|
||||||
server.wait_for_unit("lemmy-ui.service")
|
server.wait_for_unit("lemmy-ui.service")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user