This commit is contained in:
@@ -57,7 +57,7 @@ docker buildx build --no-cache --load -t gitea.jde.nz/public/simple-object-stora
|
||||
#------------------------------------------------------------------------------------------------
|
||||
# run the docker container
|
||||
title "Running docker container"
|
||||
export LOCALCONFIG="${SCRIPT_DIR}/config.json"
|
||||
export LOCALCONFIG="${SCRIPT_DIR}/sos_config.json"
|
||||
export COMPOSE_FILE="${SCRIPT_DIR}/compose.yaml"
|
||||
|
||||
[ -f "${LOCALCONFIG}" ] || die "Config file not found: ${LOCALCONFIG}"
|
||||
@@ -66,8 +66,11 @@ export COMPOSE_FILE="${SCRIPT_DIR}/compose.yaml"
|
||||
#------------------------------------------------------------------------------------------------
|
||||
title "Running tests"
|
||||
|
||||
PREV_DIR=$(pwd)
|
||||
cd "${SCRIPT_DIR}"
|
||||
|
||||
docker stop sos-test || true
|
||||
docker rm sos-test || true
|
||||
docker rm -v sos-test || true
|
||||
|
||||
LOCALCONFIG=${LOCALCONFIG} docker compose -f "${COMPOSE_FILE}" up -d
|
||||
|
||||
@@ -77,7 +80,6 @@ if ! wait_for_container "sos-test"; then
|
||||
echo "Container sos-test is not healthy"
|
||||
echo "----------------------------------------"
|
||||
docker logs sos-test
|
||||
docker inspect sos-test
|
||||
die "Container sos-test is not healthy"
|
||||
fi
|
||||
|
||||
@@ -89,5 +91,7 @@ RESULT=$?
|
||||
docker compose -f "${COMPOSE_FILE}" down
|
||||
docker compose -f "${COMPOSE_FILE}" rm -v
|
||||
|
||||
cd "${PREV_DIR}"
|
||||
|
||||
exit $RESULT
|
||||
|
||||
|
@@ -53,8 +53,8 @@ if ! command -v jq &> /dev/null; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# read ~/.config/simple_object_storage/config.json
|
||||
CONFIG_PATH="${SCRIPT_DIR}/config.json"
|
||||
# read sos_config.json
|
||||
CONFIG_PATH="${SCRIPT_DIR}/sos_config.json"
|
||||
if [ ! -f "${CONFIG_PATH}" ]; then
|
||||
echo "config file not found at ${CONFIG_PATH}"
|
||||
exit 1
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
# read ~/.config/simple_object_storage/config.json
|
||||
CONFIG_PATH="./config.json"
|
||||
# read ~/.config/simple_object_storage/sos_config.json
|
||||
CONFIG_PATH="./sos_config.json"
|
||||
if [ ! -f "${CONFIG_PATH}" ]; then
|
||||
echo "config file not found at ${CONFIG_PATH}"
|
||||
exit 1
|
||||
|
Reference in New Issue
Block a user