Update postBuild+start test case

This test was missing a start script, added it. Updated the README to
explain what the test case was doing.
pull/401/head
Tim Head 2018-09-15 08:51:30 +02:00
rodzic d9ed775dca
commit 2fedda0828
4 zmienionych plików z 15 dodań i 9 usunięć

Wyświetl plik

@ -1,8 +1,5 @@
System - Post-build scripts
---------------------------
It is possible to run scripts after you've built the environment specified in
your other files. This could be used to, for example, download data or run
some configuration scripts.
In this example, we download and install a Jupyter Notebook extension.
postBuild and start
-------------------
This test checks that we can use a postBuild and start script
at the same time.

Wyświetl plik

@ -1,2 +1,6 @@
#!/bin/bash
# this value should not be visible in `verify`
export TEST_START_VAR="var is set by postBuild"
jupyter nbextension enable --py --sys-prefix ipyleaflet

Wyświetl plik

@ -0,0 +1,4 @@
#!/bin/bash
export TEST_START_VAR="var is set"
exec "$@"

Wyświetl plik

@ -2,7 +2,8 @@
set -euo pipefail
jupyter nbextension list | grep 'jupyter-leaflet' | grep enabled
if [ "$TEST_START_VAR" != "var is set" ]
# set value of TEST_START_VAR to empty string when it is not defined
if [ "${TEST_START_VAR:-}" != "var is set" ]
then
echo "TEST_START_VAR is not set"
exit 1