Skip to content

Commit

Permalink
Merge pull request #479 from GeorgianaElena/fix_tests
Browse files Browse the repository at this point in the history
Fix failing integration tests
  • Loading branch information
yuvipanda authored Jan 13, 2020
2 parents 35216fe + 92c74d1 commit 30b47df
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .circleci/integration-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
])

Expand Down
2 changes: 1 addition & 1 deletion docs/howto/admin/resource-estimation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand Down
2 changes: 1 addition & 1 deletion docs/install/amazon.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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/>`_
Expand Down
2 changes: 1 addition & 1 deletion docs/install/custom-server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/install/google.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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**.

Expand Down
2 changes: 1 addition & 1 deletion docs/install/jetstream.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/plugins/simplest/tljh_simplest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
12 changes: 9 additions & 3 deletions integration-tests/test_simplest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
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')

Expand Down Expand Up @@ -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

0 comments on commit 30b47df

Please sign in to comment.