File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ import * as resolveTarget from "../../../src/lib/resolve-target.js";
4545import * as traceTarget from "../../../src/lib/trace-target.js" ;
4646// biome-ignore lint/performance/noNamespaceImport: needed for spyOn mocking
4747import * as versionCheck from "../../../src/lib/version-check.js" ;
48+ // biome-ignore lint/performance/noNamespaceImport: needed for spyOn mocking
49+ import * as dbAuth from "../../../src/lib/db/auth.js" ;
4850import type { SentryLog , TraceLog } from "../../../src/types/sentry.js" ;
4951
5052// ============================================================================
@@ -237,6 +239,23 @@ const newerLogs: SentryLog[] = [
237239 } ,
238240] ;
239241
242+ // ============================================================================
243+ // Auth setup — mock getAuthConfig for all tests (auth guard added in #611)
244+ // ============================================================================
245+
246+ let getAuthConfigSpy : ReturnType < typeof spyOn > ;
247+
248+ beforeEach ( ( ) => {
249+ getAuthConfigSpy = spyOn ( dbAuth , "getAuthConfig" ) . mockReturnValue ( {
250+ token : "sntrys_test" ,
251+ source : "config" ,
252+ } ) ;
253+ } ) ;
254+
255+ afterEach ( ( ) => {
256+ getAuthConfigSpy . mockRestore ( ) ;
257+ } ) ;
258+
240259// ============================================================================
241260// Standard mode (project-scoped, no trace-id positional)
242261// ============================================================================
You can’t perform that action at this time.
0 commit comments