mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-08-07 01:33:52 +00:00
test: reset smoke cache between warm cases
Clear the smoke cache before each cache-group warm case so the following offline and stale-cache checks always start from a fresh baseline instead of earlier group state. Document the runner behavior in the smoke guide to make the cache-group sequencing explicit.
This commit is contained in:
parent
b431a8c251
commit
7928e83cc5
2 changed files with 20 additions and 0 deletions
|
|
@ -39,5 +39,6 @@ scripts/live-smoke.sh --dry-run --mode full
|
|||
## Notes
|
||||
|
||||
- The runner forces `IDX_OUTPUT=table` as its default environment so table cases stay stable; JSON checks use `-o json` explicitly.
|
||||
- Cache-group warm cases clear the smoke cache before they run so each warm/offline/stale sequence starts clean and stale-cache assertions are not masked by earlier groups.
|
||||
- Ownership commands that need imported data are intentionally not part of the baseline runner yet. The current baseline only covers `ownership releases` and the known unsupported `ownership import --fetch-bing`.
|
||||
- When a case fails, inspect the per-case log in `tmp/live-smoke/.../logs/` before updating `TODO.md` or `FEATURE_SPEC.md`.
|
||||
|
|
|
|||
|
|
@ -400,6 +400,21 @@ prepare_environment() {
|
|||
bootstrap_case "ownership-db" config set ownership.db_path "$OWNERSHIP_DB"
|
||||
}
|
||||
|
||||
cache_case_starts_fresh() {
|
||||
local group="$1"
|
||||
local label="$2"
|
||||
|
||||
[[ "$group" == "cache" && "$label" == *"-warm" ]]
|
||||
}
|
||||
|
||||
reset_cache_for_case() {
|
||||
local label="$1"
|
||||
|
||||
# Cache checks need a clean starting point so the warm/offline/stale trio
|
||||
# validates TTL-sensitive fallback behavior instead of reusing prior group state.
|
||||
bootstrap_case "cache-reset-${label}" cache clear
|
||||
}
|
||||
|
||||
sanitize_name() {
|
||||
printf '%s' "$1" | tr -cs 'A-Za-z0-9._-' '_'
|
||||
}
|
||||
|
|
@ -433,6 +448,10 @@ run_case_line() {
|
|||
|
||||
printf '[%02d] %-10s %s\n' "$TOTAL_CASES" "$group" "$label"
|
||||
|
||||
if cache_case_starts_fresh "$group" "$label"; then
|
||||
reset_cache_for_case "$label"
|
||||
fi
|
||||
|
||||
if (( DRY_RUN )); then
|
||||
printf ' %s\n' "$(command_display "$env_spec" "$cmd_spec")"
|
||||
return 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue