disinto/tests
Claude 9d8f322005
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful
fix: [nomad-prep] P7 — make disinto init idempotent + add --dry-run (#800)
Make `disinto init` safe to re-run on the same box:

- Store admin token as FORGE_ADMIN_TOKEN in .env; preserve on re-run
  (previously deleted and recreated every run, churning DB state)
- Fix human token creation: use admin_pass for basic-auth since
  human_user == admin_user (previously used a random password that
  never matched the actual user password, so HUMAN_TOKEN was never
  created successfully)
- Preserve HUMAN_TOKEN in .env on re-run (same pattern as bot tokens)
- Bot tokens were already idempotent (preserved unless --rotate-tokens)

Add --dry-run flag that reports every intended action (file writes,
API calls, docker commands) based on current state, then exits 0
without touching state. Useful for CI gating and cutover confidence.

Update smoke test:
- Add dry-run test (verifies exit 0 and no .env modification)
- Add idempotency state diff (verifies .env is unchanged on re-run)
- Verify FORGE_ADMIN_TOKEN and HUMAN_TOKEN are stored in .env

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 22:37:22 +00:00
..
lib-hvault.bats fix: [nomad-prep] P4 — scaffold lib/hvault.sh (HashiCorp Vault helper module) (#799) 2026-04-15 21:15:44 +00:00
mock-forgejo.py fix: mock-forgejo path parsing bug + non-fatal cron in smoke-init (#586) 2026-04-10 15:08:43 +00:00
smoke-credentials.sh fix: fix: stop baking credentials into git remote URLs — use clean URLs + existing credential helper everywhere (#604) 2026-04-10 17:04:10 +00:00
smoke-init.sh fix: [nomad-prep] P7 — make disinto init idempotent + add --dry-run (#800) 2026-04-15 22:37:22 +00:00
smoke-load-secret.sh fix: reorder test boilerplate to avoid duplicate-detection false positive 2026-04-15 19:18:39 +00:00