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
|
|
@ -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