mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Print hub logs if hubtraf fails in integration tests
This commit is contained in:
@@ -132,6 +132,7 @@ async def test_long_username():
|
|||||||
# FIXME: wait for reload to finish & hub to come up
|
# FIXME: wait for reload to finish & hub to come up
|
||||||
# Should be part of tljh-config reload
|
# Should be part of tljh-config reload
|
||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
|
try:
|
||||||
async with User(username, hub_url, partial(login_dummy, password='')) as u:
|
async with User(username, hub_url, partial(login_dummy, password='')) as u:
|
||||||
await u.login()
|
await u.login()
|
||||||
await u.ensure_server()
|
await u.ensure_server()
|
||||||
@@ -141,3 +142,11 @@ async def test_long_username():
|
|||||||
assert pwd.getpwnam(system_username) is not None
|
assert pwd.getpwnam(system_username) is not None
|
||||||
|
|
||||||
await u.stop_server()
|
await u.stop_server()
|
||||||
|
except:
|
||||||
|
# If we have any errors, print jupyterhub logs before exiting
|
||||||
|
subprocess.check_call([
|
||||||
|
'journalctl',
|
||||||
|
'-u', 'jupyterhub',
|
||||||
|
'--no-pager'
|
||||||
|
])
|
||||||
|
raise
|
||||||
Reference in New Issue
Block a user