My-Weekly-ToDo-List/tests/debug/db-connection-test.spec.ts
mARTin-B78 b4e45aca9c
Some checks are pending
Playwright Tests / test (push) Waiting to run
Test and SonarQube / quality (push) Waiting to run
security: weitere Dateien mit Zugangsdaten aus dem Git nehmen
Das Audit hatte nur src/ nach Passwoertern durchsucht -- zu eng. Betroffen
sind vier getrackte Dateien, nicht eine:

- INFRASTRUCTURE_REQUIREMENTS.md fuehrt das DB-Passwort unverschleiert als
  "**Password**: ..." auf, dazu SMTP und NEXTAUTH_SECRET
- deployment-notes.md enthaelt DATABASE_URL und NEXTAUTH_SECRET
- tests/debug/db-connection-test.spec.ts eine Connection-URL samt echter IP
- .env.production.save, der urspruengliche Fund

Die ersten beiden und .env.production.save sind aus dem Index genommen
(lokal bleiben sie), im Testskript ist das Passwort ersetzt. .gitignore
greift jetzt auf .env* statt auf feste Namen -- genau daran war
.env.production.save vorbeigerutscht.

Im Git liegen zwei verschiedene DB-Passwoerter: eines aus dem alten
Docker-Compose-Setup (@db:5432, vermutlich tot), eines aus dem
Supabase-Zugang. Ob letzteres noch aktiv ist, klaert der Pruefbefehl
in TODO.md Block F.

v1.117.2

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-06 23:32:38 +02:00

17 lines
838 B
TypeScript

import { test } from '@playwright/test';
// Test to verify database connectivity
test('Database connection test to external PostgreSQL', async () => {
// This test doesn't actually connect to the database,
// but verifies that the environment is configured properly
console.log('Configuration check:');
console.log('- External PostgreSQL host: 192.168.178.91');
console.log('- External PostgreSQL port: 2665');
console.log('- Database name: My-Weekly-ToDo-List');
console.log('- User: root');
console.log('- Connection URL pattern: postgresql://root:<PASSWORT>@192.168.178.91:2665/My-Weekly-ToDo-List?schema=public');
// If we reach here without errors in the environment setup,
// it indicates the configuration is likely correct
console.log('✓ Environment variables configured for external PostgreSQL');
});