Skip to content

Commit 7a40f36

Browse files
authored
test: Check for specific values in auth header (getsentry#2657)
The tests changed in 8958f61 and then partly reverted in 9c525ff. This commit brings back the original checks.
1 parent d66e2d7 commit 7a40f36

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/node/test/transports/http.test.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ function createTransport(options: TransportOptions): HTTPTransport {
2828
}
2929

3030
function assertBasicOptions(options: any): void {
31-
expect(options.headers['X-Sentry-Auth']).toBeTruthy();
31+
expect(options.headers['X-Sentry-Auth']).toContain('sentry_version');
32+
expect(options.headers['X-Sentry-Auth']).toContain('sentry_client');
33+
expect(options.headers['X-Sentry-Auth']).toContain('sentry_key');
3234
expect(options.port).toEqual('8989');
3335
expect(options.path).toEqual(transportPath);
3436
expect(options.hostname).toEqual('sentry.io');

packages/node/test/transports/https.test.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ function createTransport(options: TransportOptions): HTTPSTransport {
3434
}
3535

3636
function assertBasicOptions(options: any): void {
37-
expect(options.headers['X-Sentry-Auth']).toBeTruthy();
37+
expect(options.headers['X-Sentry-Auth']).toContain('sentry_version');
38+
expect(options.headers['X-Sentry-Auth']).toContain('sentry_client');
39+
expect(options.headers['X-Sentry-Auth']).toContain('sentry_key');
3840
expect(options.port).toEqual('8989');
3941
expect(options.path).toEqual(transportPath);
4042
expect(options.hostname).toEqual('sentry.io');

0 commit comments

Comments
 (0)