kopia lustrzana https://github.com/jupyterhub/repo2docker
add path check in conda/repo-dir, more docs in conftest.py
rodzic
df733fc81b
commit
23e195f363
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue