add path check in conda/repo-dir, more docs in conftest.py
MODIFY
tests/conda/r3.6-target-repo-dir-flag/verify.py
tests/conda/r3.6-target-repo-dir-flag/verify.py
#!/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")

MODIFY
tests/conftest.py
tests/conftest.py
"""
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

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