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
|
||||
# to need at least this much RAM to build. Boo?
|
||||
# If we change this, need to change all other references to this number.
|
||||
'--memory', '768M',
|
||||
'--memory', '1G',
|
||||
image_name
|
||||
])
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ Memory
|
||||
======
|
||||
|
||||
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.
|
||||
|
||||
.. 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.
|
||||
|
||||
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.
|
||||
|
||||
You may wish to consult the listing `here <https://www.ec2instances.info/>`_
|
||||
|
||||
@@ -32,7 +32,7 @@ Pre-requisites
|
||||
|
||||
#. Some familiarity with the command line.
|
||||
#. 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.
|
||||
#. 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.
|
||||
|
||||
#. 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**.
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ Let's create the server on which we can run JupyterHub.
|
||||
|
||||
#. Give your server a descriptive **Instance Name**.
|
||||
#. 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
|
||||
how much Memory, CPU & disk space your server needs.
|
||||
|
||||
@@ -51,4 +51,4 @@ def tljh_post_install():
|
||||
@hookimpl
|
||||
def tljh_new_user_create(username):
|
||||
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 os
|
||||
import subprocess
|
||||
|
||||
from tljh.config import CONFIG_FILE, USER_ENV_PREFIX, HUB_ENV_PREFIX
|
||||
from tljh import user
|
||||
|
||||
yaml = YAML(typ='rt')
|
||||
|
||||
@@ -74,11 +76,15 @@ def test_post_install_hook():
|
||||
assert content == "123456789"
|
||||
|
||||
|
||||
def test_tljh_new_user_create():
|
||||
def test_new_user_create():
|
||||
"""
|
||||
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()
|
||||
|
||||
assert content == "a new userfile"
|
||||
assert content == username
|
||||
|
||||
Reference in New Issue
Block a user