Skip to content

Commit

Permalink
test: Check for specific values in auth header (#2657)
Browse files Browse the repository at this point in the history
The tests changed in 8958f61 and then
partly reverted in 9c525ff. This commit
brings back the original checks.
  • Loading branch information
rhcarvalho committed Jun 8, 2020
1 parent d66e2d7 commit 7a40f36
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/node/test/transports/http.test.ts
Expand Up @@ -28,7 +28,9 @@ function createTransport(options: TransportOptions): HTTPTransport {
}

function assertBasicOptions(options: any): void {
expect(options.headers['X-Sentry-Auth']).toBeTruthy();
expect(options.headers['X-Sentry-Auth']).toContain('sentry_version');
expect(options.headers['X-Sentry-Auth']).toContain('sentry_client');
expect(options.headers['X-Sentry-Auth']).toContain('sentry_key');
expect(options.port).toEqual('8989');
expect(options.path).toEqual(transportPath);
expect(options.hostname).toEqual('sentry.io');
Expand Down
4 changes: 3 additions & 1 deletion packages/node/test/transports/https.test.ts
Expand Up @@ -34,7 +34,9 @@ function createTransport(options: TransportOptions): HTTPSTransport {
}

function assertBasicOptions(options: any): void {
expect(options.headers['X-Sentry-Auth']).toBeTruthy();
expect(options.headers['X-Sentry-Auth']).toContain('sentry_version');
expect(options.headers['X-Sentry-Auth']).toContain('sentry_client');
expect(options.headers['X-Sentry-Auth']).toContain('sentry_key');
expect(options.port).toEqual('8989');
expect(options.path).toEqual(transportPath);
expect(options.hostname).toEqual('sentry.io');
Expand Down

0 comments on commit 7a40f36

Please sign in to comment.