Remove $PYTEST

Signed-off-by: yubiuser <github@yubiuser.dev>
This commit is contained in:
yubiuser
2025-09-27 14:49:19 +02:00
parent fd15c683bb
commit d3ab97d7b1
3 changed files with 3 additions and 15 deletions

View File

@@ -104,11 +104,9 @@ migrate_gravity() {
echo " [i] Gravity migration checks"
gravityDBfile=$(getFTLConfigValue files.gravity)
if [[ -z "${PYTEST}" ]]; then
if [[ ! -f /etc/pihole/adlists.list ]]; then
echo " [i] No adlist file found, creating one with a default blocklist"
echo "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" >/etc/pihole/adlists.list
fi
if [[ ! -f /etc/pihole/adlists.list ]]; then
echo " [i] No adlist file found, creating one with a default blocklist"
echo "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" >/etc/pihole/adlists.list
fi
if [ ! -f "${gravityDBfile}" ]; then

View File

@@ -146,12 +146,6 @@ stop() {
echo " https://docs.docker.com/engine/containers/start-containers-automatically/#use-a-restart-policy"
echo ""
# If we are running pytest, keep the container alive for a little longer
# to allow the tests to complete
if [[ ${PYTEST} ]]; then
sleep 10
fi
exit "${FTL_EXIT_CODE}"
}

View File

@@ -45,10 +45,6 @@ def docker(request):
for env_var in env_vars:
cmd.extend(["-e", env_var])
# ensure PYTEST=1 is set
if not any("PYTEST=1" in arg for arg in cmd):
cmd.extend(["-e", "PYTEST=1"])
# add default TZ if not already set
if not any("TZ=" in arg for arg in cmd):
cmd.extend(["-e", 'TZ="Europe/London"'])