2022-06-08 21:19:31 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Optional: Import test library
|
|
|
|
source dev-container-features-test-lib
|
|
|
|
|
2022-09-26 20:50:13 +03:00
|
|
|
# Always run these checks as the non-root user
|
|
|
|
user="$(whoami)"
|
|
|
|
check "user" grep vscode <<< "$user"
|
|
|
|
|
|
|
|
# Check for an installation of JupyterLab
|
2022-06-08 21:19:31 +03:00
|
|
|
check "version" jupyter lab --version
|
|
|
|
|
2022-09-26 20:50:13 +03:00
|
|
|
# Check location of JupyterLab installation
|
|
|
|
packages="$(python3 -m pip list)"
|
|
|
|
check "location" grep jupyter <<< "$packages"
|
|
|
|
|
2022-11-14 22:46:13 +03:00
|
|
|
# Check for git extension
|
2023-09-27 21:51:26 +03:00
|
|
|
check "jupyterlab_git" grep jupyterlab_git <<< "$packages"
|
2022-11-14 22:46:13 +03:00
|
|
|
|
2022-09-26 20:50:13 +03:00
|
|
|
# Check for correct JupyterLab configuration
|
|
|
|
check "config" grep ".*.allow_origin = '*'" /home/vscode/.jupyter/jupyter_server_config.py
|
2022-08-05 21:11:46 +03:00
|
|
|
|
2022-06-08 21:19:31 +03:00
|
|
|
# Report result
|
|
|
|
reportResults
|