aboutsummaryrefslogtreecommitdiff
path: root/test/python/install_jupyterlab_ubuntu.sh
diff options
context:
space:
mode:
authorAlexander Smolyakov <v-asmoliakov@microsoft.com>2023-09-27 21:51:26 +0300
committerGitHub <noreply@github.com>2023-09-27 21:51:26 +0300
commit0d2fc3ad5b9d6bb33a29891c2378a377f0618c9b (patch)
treed955fe79da7e1038a78bfe826c10baa82570dcd6 /test/python/install_jupyterlab_ubuntu.sh
parente7f7d194d634e86b29ed2b74a35dd3c24fa1f7a5 (diff)
[python] Change the `sudo_if` function to avoid issues with Bash (#694)feature_python_1.2.0
* [python] Updated `sudo_if` function - Remove double quotes to avoid issues with string tokenization * Add test scenario * Revert "Add test scenario" This reverts commit 9e62a3797a8f5eddf5c24a6b5fd30bd2c4be8c54. * Update `jupyterlab git` package name * Bump feature version * Test: Install jupyterlab under root user * Refactor changes * Bump patch version * Address review points
Diffstat (limited to 'test/python/install_jupyterlab_ubuntu.sh')
-rw-r--r--test/python/install_jupyterlab_ubuntu.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/python/install_jupyterlab_ubuntu.sh b/test/python/install_jupyterlab_ubuntu.sh
new file mode 100644
index 0000000..3db7fd4
--- /dev/null
+++ b/test/python/install_jupyterlab_ubuntu.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# Check for an installation of JupyterLab
+check "version" jupyter lab --version
+
+# Check location of JupyterLab installation
+packages="$(python3 -m pip list)"
+check "location" grep jupyter <<< "$packages"
+
+# Check for git extension
+check "jupyterlab_git" grep jupyterlab_git <<< "$packages"
+
+# Check for correct JupyterLab configuration
+check "config" grep ".*.allow_origin = '*'" /root/.jupyter/jupyter_server_config.py
+
+# Report result
+reportResults