feat: Standarize boolean values

Allow caseinsensitive values for booleans
This commit is contained in:
Carlos Álvaro
2021-12-30 22:39:47 +01:00
parent 1a388e9cc2
commit 219402535f
10 changed files with 28 additions and 28 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e
[ "${DEBUG}" == true ] && set -vx
[ "${DEBUG,,}" == true ] && set -vx
echo "🧪 Running basic tests ..."
@@ -26,5 +26,5 @@ ok "salt version"
# Test image calling healthcheck
echo "==> Executing healthcheck ..."
docker-exec /usr/local/sbin/healthcheck | grep -i 'true' || error "healthcheck"
docker-exec /usr/local/sbin/healthcheck | grep -i true || error "healthcheck"
ok "healthcheck"

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e
[ "${DEBUG}" == true ] && set -vx
[ "${DEBUG,,}" == true ] && set -vx
echo "🧪 Running config-reloader tests ..."
@@ -16,7 +16,7 @@ trap cleanup EXIT
# Run test instance
echo "==> Starting docker-salt-master (${PLATFORM}) ..."
start_container_and_wait \
--env SALT_RESTART_MASTER_ON_CONFIG_CHANGE=true \
--env SALT_RESTART_MASTER_ON_CONFIG_CHANGE=True \
--volume "${SCRIPT_PATH}/config":/home/salt/data/config:ro \
|| error "container started"
ok "container started"

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e
[ "${DEBUG}" == true ] && set -vx
[ "${DEBUG,,}" == true ] && set -vx
echo "🧪 Running gitfs tests ..."
@@ -34,7 +34,7 @@ ok "container started"
echo "==> Updating gitfs repositories ..."
salt-run cache.clear_git_lock gitfs type=update
UPDATE_REPOS="$( salt-run fileserver.update )"
echo "${UPDATE_REPOS}" | grep -qi 'true' || error "update gitfs"
echo "${UPDATE_REPOS}" | grep -qi true || error "update gitfs"
ok "update gitfs"
# Check pillars

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e
[ "${DEBUG}" == true ] && set -vx
[ "${DEBUG,,}" == true ] && set -vx
echo "🧪 Running salt-api tests ..."
@@ -37,7 +37,7 @@ ok "salt-api config created"
echo "==> Starting docker-salt-master (${PLATFORM}) with salt-api config ..."
start_container_and_wait \
--publish 8000:8000 \
--env SALT_API_SERVICE_ENABLED=true \
--env SALT_API_SERVICE_ENABLED=True \
--env SALT_API_USER_PASS="${SALTAPI_PASS}" \
--volume "${SALTAPI_TMP_DIR}/config":/home/salt/data/config:ro \
|| error "container started"
@@ -61,7 +61,7 @@ curl -sSk "${SALTAPI_URL}" \
-d client=runner \
-d tgt='*' \
-d fun=test.stream \
| grep -i 'true' || error "curl command"
| grep -i true || error "curl command"
ok "curl command"
# Install salt-pepper