Skip to content

Commit

Permalink
Add test to check if serverextensions are installed
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Aug 4, 2018
1 parent 1f4acfe commit 787969a
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion integration-tests/test_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from hubtraf.user import User
from hubtraf.auth.dummy import login_dummy
import secrets
import subprocess
import pytest
from functools import partial
import asyncio
Expand Down Expand Up @@ -104,4 +105,24 @@ async def test_user_admin_remove():
await u.ensure_server()

# Assert that the user does *not* have admin rights
assert f'jupyter-{username}' in grp.getgrnam('jupyterhub-admins').gr_mem
assert f'jupyter-{username}' in grp.getgrnam('jupyterhub-admins').gr_mem


def test_serverextensions():
"""
Validate serverextensions we want are installed
"""
proc = subprocess.run([
'/opt/tljh/user/bin/jupyter-serverextensions',
'list', '--sys-prefix'
], text=True)

extensions = [
'jupyterlab 0.32.1',
'nbgitpuller 0.6.1',
'nteract_on_jupyter 1.8.1',
'nbresuse'
]

for e in extensions:
assert '{} ^[[32mOK^[[0m' in e.stderr

0 comments on commit 787969a

Please sign in to comment.