diff --git a/serverAppConfigs-docs/Architecture/Testing Policy.md b/serverAppConfigs-docs/Architecture/Testing Policy.md index 4a7b87a..b90fbc3 100644 --- a/serverAppConfigs-docs/Architecture/Testing Policy.md +++ b/serverAppConfigs-docs/Architecture/Testing Policy.md @@ -15,10 +15,9 @@ This repository tests its configuration at defined seams. The tests run with `ba | Seam | File | What it asserts | |------|------|-----------------| -| Compose validity | `tests/compose_validity.bats` | YAML parses, services have images, no named volumes | | Env consistency | `tests/env_consistency.bats` | every `${VAR}` is defined in `.env.example`; no real secrets; the live gitea password never appears | | Caddyfile validity | `tests/caddyfile.bats` | per-host Caddyfile, `.local` convention, balanced braces, basic auth present | -| Docs completeness | `tests/docs_completeness.bats` | every compose service has a docs page; index links every page | +| Docs completeness | `tests/docs_completeness.bats` | every service has a docs page; index links every page; no unresolved vault links | | Script syntax | `tests/scripts_syntax.bats` | `bash -n` clean, executable bits, shellcheck when available | | Deployment flow | `tests/deployment_flow.bats`, `tests/deployment_scoping.bats` | scoped dispatcher exists, targets are known, service plans isolate inference, Caddy ownership is guarded, and SSH reachability is checked (skips offline) | | Quadlet units | `tests/*quadlet*.bats` | every unit is boot-persistent, self-healing, repo-provenanced, secret-free | diff --git a/tests/docs_completeness.bats b/tests/docs_completeness.bats index 775e3d9..cd4f130 100644 --- a/tests/docs_completeness.bats +++ b/tests/docs_completeness.bats @@ -1,5 +1,7 @@ #!/usr/bin/env bats # Seam: documentation completeness. +# (compose era retired 2026-10-13; the sweep below now skips trash so a +# revived compose file stays covered without resurrecting retired services) # Every service defined in a compose.yaml must have a matching documentation # page in serverAppConfigs-docs/ and must be reachable from the index. This is the "docs first" # contract of this repo: no service ships without documentation. @@ -18,7 +20,7 @@ load helpers return 1 fi done < <(services_in "$f") - done < <(find "$REPO_ROOT" -name 'compose.yaml' -not -path '*/.git/*' | sort) + done < <(find "$REPO_ROOT" -name 'compose.yaml' -not -path '*/.git/*' -not -path '*/.AGENTTRASH/*' | sort) } @test "docs index links every docs page" { diff --git a/tests/env_consistency.bats b/tests/env_consistency.bats index 2f7efa7..f8a419e 100644 --- a/tests/env_consistency.bats +++ b/tests/env_consistency.bats @@ -1,33 +1,12 @@ #!/usr/bin/env bats # Seam: environment variable consistency and secret hygiene. -# Every ${VAR} referenced in a compose.yaml or Caddyfile must be defined in the -# matching .env.example. .env.example files must contain only placeholders, and +# Every ${VAR} referenced in a Caddyfile must be defined in the matching +# .env.example. .env.example files must contain only placeholders, and # the live gitea database password must never appear in tracked files. +# (The compose.yaml sweeps retired with the last compose file on 2026-10-13.) load helpers -@test "every compose.yaml has a sibling .env.example" { - while IFS= read -r f; do - local envfile - envfile="$(dirname "$f")/.env.example" - [ -f "$envfile" ] || { echo "missing $envfile for $f"; return 1; } - done < <(find "$REPO_ROOT" -name 'compose.yaml' -not -path '*/.git/*' | sort) -} - -@test "every \${VAR} in compose.yaml is defined in the sibling .env.example" { - while IFS= read -r f; do - local envfile - envfile="$(dirname "$f")/.env.example" - while IFS= read -r var; do - [ -z "$var" ] && continue - if ! env_vars_defined "$envfile" | grep -qx "$var"; then - echo "$f references \${$var} but $envfile does not define it" - return 1 - fi - done < <(env_vars_in "$f") - done < <(find "$REPO_ROOT" -name 'compose.yaml' -not -path '*/.git/*' | sort) -} - @test ".env.example files contain only placeholder values" { while IFS= read -r f; do has_placeholder_secret "$f"