mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Merge pull request #479 from GeorgianaElena/fix_tests
Fix failing integration tests
This commit is contained in:
@@ -32,7 +32,7 @@ def run_systemd_image(image_name, container_name):
|
|||||||
# This is the minimum VM size we support. JupyterLab extensions seem
|
# This is the minimum VM size we support. JupyterLab extensions seem
|
||||||
# to need at least this much RAM to build. Boo?
|
# to need at least this much RAM to build. Boo?
|
||||||
# If we change this, need to change all other references to this number.
|
# If we change this, need to change all other references to this number.
|
||||||
'--memory', '768M',
|
'--memory', '1G',
|
||||||
image_name
|
image_name
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Memory
|
|||||||
======
|
======
|
||||||
|
|
||||||
Memory is usually the biggest determinant of server size in most JupyterHub
|
Memory is usually the biggest determinant of server size in most JupyterHub
|
||||||
installations. At minimum, your server must have at least **768MB** of RAM
|
installations. At minimum, your server must have at least **1GB** of RAM
|
||||||
for TLJH to install.
|
for TLJH to install.
|
||||||
|
|
||||||
.. math::
|
.. math::
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ Let's create the server on which we can run JupyterHub.
|
|||||||
`Next: Configure Instance Details` in the lower right corner.
|
`Next: Configure Instance Details` in the lower right corner.
|
||||||
|
|
||||||
Check out our guide on How To :ref:`howto/admin/resource-estimation` to help pick
|
Check out our guide on How To :ref:`howto/admin/resource-estimation` to help pick
|
||||||
how much Memory / CPU your server needs. You need to have at least **768MB** of
|
how much Memory / CPU your server needs. You need to have at least **1GB** of
|
||||||
RAM.
|
RAM.
|
||||||
|
|
||||||
You may wish to consult the listing `here <https://www.ec2instances.info/>`_
|
You may wish to consult the listing `here <https://www.ec2instances.info/>`_
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ Pre-requisites
|
|||||||
|
|
||||||
#. Some familiarity with the command line.
|
#. Some familiarity with the command line.
|
||||||
#. A server running Ubuntu 18.04 where you have root access.
|
#. A server running Ubuntu 18.04 where you have root access.
|
||||||
#. At least **768MB** of RAM on your server.
|
#. At least **1GB** of RAM on your server.
|
||||||
#. Ability to ``ssh`` into the server & run commands from the prompt.
|
#. Ability to ``ssh`` into the server & run commands from the prompt.
|
||||||
#. A **IP address** where the server can be reached from the browsers of your target audience.
|
#. A **IP address** where the server can be reached from the browsers of your target audience.
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ Let's create the server on which we can run JupyterHub.
|
|||||||
#. For **Zone**, pick any of the options. Leaving the default as is is fine.
|
#. For **Zone**, pick any of the options. Leaving the default as is is fine.
|
||||||
|
|
||||||
#. Under **Machine** type, select the amount of CPU / RAM / GPU you want for your
|
#. Under **Machine** type, select the amount of CPU / RAM / GPU you want for your
|
||||||
server. You need at least **768MB** of RAM.
|
server. You need at least **1GB** of RAM.
|
||||||
|
|
||||||
You can select a preset combination in the default **basic view**.
|
You can select a preset combination in the default **basic view**.
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ Let's create the server on which we can run JupyterHub.
|
|||||||
|
|
||||||
#. Give your server a descriptive **Instance Name**.
|
#. Give your server a descriptive **Instance Name**.
|
||||||
#. Select an appropriate **Instance Size**. We suggest m1.medium or larger.
|
#. Select an appropriate **Instance Size**. We suggest m1.medium or larger.
|
||||||
Make sure your instance has at least **768MB** of RAM.
|
Make sure your instance has at least **1GB** of RAM.
|
||||||
|
|
||||||
Check out our guide on How To :ref:`howto/admin/resource-estimation` to help pick
|
Check out our guide on How To :ref:`howto/admin/resource-estimation` to help pick
|
||||||
how much Memory, CPU & disk space your server needs.
|
how much Memory, CPU & disk space your server needs.
|
||||||
|
|||||||
@@ -51,4 +51,4 @@ def tljh_post_install():
|
|||||||
@hookimpl
|
@hookimpl
|
||||||
def tljh_new_user_create(username):
|
def tljh_new_user_create(username):
|
||||||
with open('test_new_user_create', 'w') as f:
|
with open('test_new_user_create', 'w') as f:
|
||||||
f.write("a new userfile")
|
f.write(username)
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ from ruamel.yaml import YAML
|
|||||||
import requests
|
import requests
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from tljh.config import CONFIG_FILE, USER_ENV_PREFIX, HUB_ENV_PREFIX
|
from tljh.config import CONFIG_FILE, USER_ENV_PREFIX, HUB_ENV_PREFIX
|
||||||
|
from tljh import user
|
||||||
|
|
||||||
yaml = YAML(typ='rt')
|
yaml = YAML(typ='rt')
|
||||||
|
|
||||||
@@ -74,11 +76,15 @@ def test_post_install_hook():
|
|||||||
assert content == "123456789"
|
assert content == "123456789"
|
||||||
|
|
||||||
|
|
||||||
def test_tljh_new_user_create():
|
def test_new_user_create():
|
||||||
"""
|
"""
|
||||||
Test that plugin receives username as arg
|
Test that plugin receives username as arg
|
||||||
"""
|
"""
|
||||||
with open("test_new_user_create") as f:
|
username="user1"
|
||||||
|
# Call ensure_user to make sure the user plugin gets called
|
||||||
|
user.ensure_user(username)
|
||||||
|
|
||||||
|
with open(f"test_new_user_create") as f:
|
||||||
content = f.read()
|
content = f.read()
|
||||||
|
|
||||||
assert content == "a new userfile"
|
assert content == username
|
||||||
|
|||||||
Reference in New Issue
Block a user