fix(tests): consolidate helpers and fix test infrastructure
Consolidate duplicate test helper functions and fix test issues
discovered during aggregator development.
helpers.go:
- Consolidated createSimpleTestJWT() (removed duplicates from post_e2e_test.go)
- Consolidated generateTID() (removed duplicates)
- Added createPDSAccount() for E2E tests
- Added writePDSRecord() for E2E tests
- All helpers now shared across test files
post_e2e_test.go:
- Removed duplicate helper functions (now in helpers.go)
- Cleaned up unused imports (auth, base64, jwt)
- Fixed import order
community_identifier_resolution_test.go:
- Fixed PDS URL default from port 3000 → 3001
- Matches actual dev PDS configuration (.env.dev)
- Test now passes with running PDS
auth.go middleware:
- Minor logging improvements for auth failures
Test results:
✅ TestCommunityIdentifierResolution: NOW PASSES (was failing)
✅ All aggregator tests: PASSING
✅ All community tests: PASSING
❌ TestPostCreation_Basic: Still failing (pre-existing auth context issue)
Overall test suite:
- 74 out of 75 tests passing (98.7% pass rate)
- Only failure is pre-existing auth context issue in old test
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>