plano/tests/e2e/run_responses_state_tests.sh
2026-03-03 15:08:50 -08:00

48 lines
1.1 KiB
Bash
Executable file

#!/bin/bash
# Runs the openai responses API with state storage e2e test suite.
# Requires the plano Docker image to already be built/loaded.
set -e
. ./common_scripts.sh
print_disk_usage
mkdir -p ~/plano_logs
touch ~/plano_logs/modelserver.log
print_debug() {
log "Received signal to stop"
log "Printing debug logs for docker"
log "===================================="
tail -n 100 ../build.log 2>/dev/null || true
planoai logs --debug 2>/dev/null | tail -n 100 || true
}
trap 'print_debug' INT TERM ERR
log starting > ../build.log
# Install plano CLI
log "building and installing plano cli"
cd ../../cli
uv sync
uv tool install .
cd -
# Re-sync e2e deps
uv sync
# Start gateway with state storage config
log "startup plano gateway with state storage config"
cd ../../
planoai down --docker || true
planoai up --docker tests/e2e/config_memory_state_v1_responses.yaml
cd -
# Run tests
log "running e2e tests for openai responses api with state"
uv run pytest test_openai_responses_api_client_with_state.py
# Cleanup
log "shutting down"
planoai down --docker || true