add path check in conda/repo-dir, more docs in conftest.py

pull/976/head
Nicholas Bollweg 2020-10-19 10:31:19 -04:00 zatwierdzone przez Erik Sundell
rodzic df733fc81b
commit 23e195f363
2 zmienionych plików z 23 dodań i 5 usunięć

Wyświetl plik

@ -1,6 +1,7 @@
#!/usr/bin/env python
import sys
import os
from glob import glob
# conda should still be in /srv/conda
# and Python should still be in $NB_PYTHON_PREFIX
@ -15,3 +16,12 @@ assert os.path.abspath(__file__) == "/srv/repo/verify.py"
# Repo should be writable
assert os.access("/srv/repo", os.W_OK)
# All files in repo dir should be readable and writeable
for path in glob("/src/repo/**/*", recursive=True):
assert os.access(path, os.R_OK)
assert os.access(path, os.W_OK)
# Should be able to make a new file
with open("/srv/repo/writeable", "w") as fp:
fp.write("writeable")

Wyświetl plik

@ -1,11 +1,19 @@
"""
Custom test collector for our integration tests.
Each directory that has a script named 'verify' is considered
a test. jupyter-repo2docker is run on that directory,
and then ./verify is run inside the built container. It should
return a non-zero exit code for the test to be considered a
success.
Test lifecycle:
- Find all directories that contain `verify` or `*.repos.yaml`
- If `verify` is found:
- Run `jupyter-repo2docker` on the test directory.
- Extra arguments may be added as YAML list of strings in `extra-args.yaml`.
- Run `./verify` inside the built container.
- It should return a non-zero exit code for the test to be considered a
successful.
- If a `*.repos.yaml` is found:
- For each entry of the form `{name, url, ref, verify}`
- Run `jupyter-repo2docker` with the `url` and `ref`
- Run the `verify` inside the built container
"""
import os