Fix docker
This commit is contained in:
@@ -53,9 +53,9 @@ jobs:
|
|||||||
set -x
|
set -x
|
||||||
|
|
||||||
# Make a fake module to test the image
|
# Make a fake module to test the image
|
||||||
MODULE_PATH="modules/module_name/index.js"
|
MODULE_PATH="module_name/index.js"
|
||||||
mkdir -p $(dirname $MODULE_PATH)
|
mkdir -p $(dirname test_modules/$MODULE_PATH)
|
||||||
echo 'alert("Testing");' > $MODULE_PATH
|
echo 'alert("Testing");' > test_modules/$MODULE_PATH
|
||||||
|
|
||||||
# Spin up a container of the image
|
# Spin up a container of the image
|
||||||
ELEMENT_WEB_PORT=8181
|
ELEMENT_WEB_PORT=8181
|
||||||
@@ -71,7 +71,7 @@ jobs:
|
|||||||
# Run some smoke tests
|
# Run some smoke tests
|
||||||
wget --retry-connrefused --tries=5 -q --wait=3 --spider "http://localhost:$ELEMENT_WEB_PORT/modules/module_name/index.js"
|
wget --retry-connrefused --tries=5 -q --wait=3 --spider "http://localhost:$ELEMENT_WEB_PORT/modules/module_name/index.js"
|
||||||
MODULE_0=$(curl "http://localhost:$ELEMENT_WEB_PORT/config.json" | jq -r .modules[0])
|
MODULE_0=$(curl "http://localhost:$ELEMENT_WEB_PORT/config.json" | jq -r .modules[0])
|
||||||
test "$MODULE_0" = "/${MODULE_PATH}"
|
test "$MODULE_0" = "/modules/${MODULE_PATH}"
|
||||||
|
|
||||||
# Check healthcheck
|
# Check healthcheck
|
||||||
until test "$(docker inspect -f {{.State.Health.Status}} $CONTAINER_ID)" == "healthy"; do
|
until test "$(docker inspect -f {{.State.Health.Status}} $CONTAINER_ID)" == "healthy"; do
|
||||||
|
|||||||
Reference in New Issue
Block a user