tests: Testsuite meldet nicht mehr an GlitchTip — Sentry-DSNs in phpunit.xml geleert, Wächtertest; Produktions-Logs unter dev/ ignoriert
Seit der lokalen DSN landeten absichtlich provozierte Fehler aus den Tests („Queue weg“, „Datenbank nicht erreichbar“, SQLite „no such table“, fehlende Rolle `customer`, Wasserstandsmarke) als Issues in GlitchTip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
168a1cd3de
commit
17dceec4f7
3 changed files with 19 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -80,3 +80,6 @@ config/files/
|
|||
# Doku lebt im Obsidian-Vault (iCloud), per Devcontainer nach docs/ eingebunden
|
||||
# — nicht im Repository (Audit Q-05, entschieden 05.10.2026).
|
||||
/docs/
|
||||
|
||||
# Produktions-Logs zur Auswertung (können personenbezogene Daten enthalten)
|
||||
/dev/**/*.log
|
||||
|
|
|
|||
|
|
@ -34,6 +34,13 @@
|
|||
<!-- DB_URL würde Treiber und Datenbank beim Verbindungsaufbau überschreiben (Audit 02.10.2026, O02). -->
|
||||
<env name="DB_URL" value="" force="true"/>
|
||||
<server name="DB_URL" value="" force="true"/>
|
||||
<!-- Tests provozieren Fehler absichtlich — nie an das echte GlitchTip (Monitoring-Plan 1.1). -->
|
||||
<env name="SENTRY_LARAVEL_DSN" value="" force="true"/>
|
||||
<env name="SENTRY_DSN" value="" force="true"/>
|
||||
<env name="SENTRY_BROWSER_DSN" value="" force="true"/>
|
||||
<server name="SENTRY_LARAVEL_DSN" value="" force="true"/>
|
||||
<server name="SENTRY_DSN" value="" force="true"/>
|
||||
<server name="SENTRY_BROWSER_DSN" value="" force="true"/>
|
||||
<env name="MAIL_MAILER" value="array"/>
|
||||
<env name="PULSE_ENABLED" value="false"/>
|
||||
<env name="QUEUE_CONNECTION" value="sync"/>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ use App\Support\Monitoring\ErrorReportScrubber;
|
|||
use Illuminate\Support\Facades\Route;
|
||||
use Sentry\Event;
|
||||
use Sentry\ExceptionDataBag;
|
||||
use Sentry\SentrySdk;
|
||||
use Tests\Support\FakeGlitchTip;
|
||||
|
||||
/**
|
||||
|
|
@ -75,3 +76,11 @@ test('messages and exception values lose e-mail addresses', function () {
|
|||
->and($scrubbed?->getExceptions()[0]->getValue())->toBe('Duplicate entry \'[email]\'')
|
||||
->and($scrubbed?->getUser())->toBeNull();
|
||||
});
|
||||
|
||||
test('the test suite never reports to the real glitchtip', function () {
|
||||
// Ohne diese Absicherung landeten absichtlich provozierte Fehler
|
||||
// („Queue weg“, „Datenbank nicht erreichbar“) als Issues in GlitchTip.
|
||||
expect(config('sentry.dsn'))->toBeEmpty()
|
||||
->and(config('monitoring.browser.dsn'))->toBeEmpty()
|
||||
->and(SentrySdk::getCurrentHub()->getClient()?->getOptions()->getDsn())->toBeNull();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue