test(config): provide public-index runner for config upgrade suite (#7251)

This commit is contained in:
Tsai Yuan 2026-10-22 07:40:35 +08:00 committed by GitHub
parent c08ae955e5
commit a78fcdeb91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 25 additions and 1 deletions

View File

@ -361,6 +361,11 @@ cd frontend
make test-e2e
```
If a host-configured uv package mirror blocks dependencies while running the
config upgrade tests, run `make test-config-version` from the repository root.
That command uses public PyPI for this suite and its subprocesses without
changing the host's uv settings or the normal config upgrade command.
`make test-live` calls real external APIs and may incur API costs or create
local sandboxes, artifacts, and files. It is never run by the default backend
test command or CI. Direct pytest invocations of `tests/test_client_live.py`

View File

@ -1,6 +1,6 @@
# DeerFlow - Unified Development Environment
.PHONY: help config config-upgrade check check-agent-guidance install extension-install extension-upgrade extension-list extension-enable extension-disable extension-remove setup doctor support-bundle detect-thread-boundaries detect-blocking-io dev dev-daemon dev-multi dev-multi-check dev-multi-down start start-daemon nginx stop up down prod-logs clean docker-init docker-start docker-stop docker-logs docker-logs-frontend docker-logs-gateway docker-logs-redis setup-sandbox
.PHONY: help config config-upgrade test-config-version check check-agent-guidance install extension-install extension-upgrade extension-list extension-enable extension-disable extension-remove setup doctor support-bundle detect-thread-boundaries detect-blocking-io dev dev-daemon dev-multi dev-multi-check dev-multi-down start start-daemon nginx stop up down prod-logs clean docker-init docker-start docker-stop docker-logs docker-logs-frontend docker-logs-gateway docker-logs-redis setup-sandbox
BASH ?= bash
BACKEND_UV_RUN = cd backend && uv run
@ -30,6 +30,7 @@ help:
@echo " make support-bundle - Create a redacted issue summary, AI draft, and evidence bundle"
@echo " make config - Generate local config files (aborts if config already exists)"
@echo " make config-upgrade - Merge new fields from config.example.yaml into config.yaml"
@echo " make test-config-version - Run config upgrade tests with the public uv index"
@echo " make check - Check if all required tools are installed"
@echo " make check-agent-guidance - Validate scoped AGENTS.md file and chain budgets"
@echo " make detect-thread-boundaries - Inventory backend executor/thread/event-loop boundaries"
@ -89,6 +90,9 @@ config:
config-upgrade:
@$(RUN_SHELL_SCRIPT) ./scripts/config-upgrade.sh
test-config-version:
@$(RUN_SHELL_SCRIPT) ./scripts/test-config-version.sh
# Check required tools
check:
@$(PYTHON) ./scripts/check.py

View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
# Run the config-upgrade integration suite without inheriting a host uv mirror.
# This is an opt-in test command; normal uv and config-upgrade calls keep the
# operator's configured package indexes.
set -euo pipefail
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# uv's extra indexes take precedence over the default index. Clear both the
# current and deprecated environment spellings before selecting public PyPI.
unset UV_INDEX UV_EXTRA_INDEX_URL UV_INDEX_URL
export UV_DEFAULT_INDEX=https://pypi.org/simple
cd "$REPO_ROOT/backend"
exec uv run --locked pytest -q tests/test_config_version.py "$@"