Files
owui-tools/tests/test_tool_toggle.sh
2026-09-15 15:24:03 -04:00

19 lines
705 B
Bash
Executable File

#!/usr/bin/env bash
# The half of the tool switch that needs a real app: the OpenAPI spec and
# the routes. Runs inside the api image because it needs fastapi and redis,
# with the source mounted over the baked copy so it tests the tree you are
# editing rather than the last image you built.
#
# ./tests/test_tool_toggle.sh
#
# No network: --network none, and nothing here reaches out.
set -euo pipefail
cd "$(dirname "$0")/.."
exec docker run --rm --network none \
-v "$(pwd)/app/owuitools:/app/owuitools:ro" \
-v "$(pwd)/configs:/configs:ro" \
-v "$(pwd)/tests/tool_toggle_routes.py:/tool_toggle_routes.py:ro" \
--entrypoint python \
local/owuitools-api:latest /tool_toggle_routes.py "$@"