Commit Graph

1 Commits

Author SHA1 Message Date
Self Hosters
0deb72774f Add authentication migration test suite
Prevent regression of the "authUsername is not defined" error by
adding comprehensive tests and pre-commit hooks.

New test files:
- scripts/test-auth-migration.sh: Full test suite (8 test cases)
  * Checks for obsolete auth variable references
  * Validates session management implementation
  * Verifies vulnerability functions use correct auth
  * Tests logout button and documentation

- scripts/pre-commit-hook.sh: Git pre-commit hook
  * Blocks commits containing authUsername/authPassword
  * Provides helpful error messages
  * Can be installed with symlink

- scripts/TESTING.md: Testing documentation
  * How to run tests
  * How to install pre-commit hook
  * Correct vs incorrect auth patterns
  * Troubleshooting guide

All tests currently passing (8/8). Pre-commit hook validated.

These tests ensure the session-based authentication migration
remains complete and prevent accidental reintroduction of removed
Basic Auth variables.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:37:20 -05:00