Skip to content

Commit 0a772c1

Browse files
committed
test(node): Use https version of example.com in Node integration tests
1 parent e28d491 commit 0a772c1

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

dev-packages/node-integration-tests/suites/tracing/httpIntegration/server-ignoreOutgoingRequests.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Sentry.init({
1111
integrations: [
1212
Sentry.httpIntegration({
1313
ignoreOutgoingRequests: (url, request) => {
14-
if (url === 'http://example.com/blockUrl') {
14+
if (url === 'https://example.com/blockUrl') {
1515
return true;
1616
}
1717

@@ -34,16 +34,16 @@ const app = express();
3434
app.use(cors());
3535

3636
app.get('/testUrl', (_req, response) => {
37-
makeHttpRequest('http://example.com/blockUrl').then(() => {
38-
makeHttpRequest('http://example.com/pass').then(() => {
37+
makeHttpRequest('https://example.com/blockUrl').then(() => {
38+
makeHttpRequest('https://example.com/pass').then(() => {
3939
response.send({ response: 'done' });
4040
});
4141
});
4242
});
4343

4444
app.get('/testRequest', (_req, response) => {
45-
makeHttpRequest('http://example.com/blockRequest').then(() => {
46-
makeHttpRequest('http://example.com/pass').then(() => {
45+
makeHttpRequest('https://example.com/blockRequest').then(() => {
46+
makeHttpRequest('https://example.com/pass').then(() => {
4747
response.send({ response: 'done' });
4848
});
4949
});

dev-packages/node-integration-tests/suites/tracing/httpIntegration/test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ describe('httpIntegration', () => {
137137

138138
const requestSpans = event.spans?.filter(span => span.op === 'http.client');
139139
expect(requestSpans).toHaveLength(1);
140-
expect(requestSpans![0]?.description).toBe('GET http://example.com/pass');
140+
expect(requestSpans![0]?.description).toBe('GET https://example.com/pass');
141141

142142
const breadcrumbs = event.breadcrumbs?.filter(b => b.category === 'http');
143143
expect(breadcrumbs).toHaveLength(1);
144-
expect(breadcrumbs![0]?.data?.url).toEqual('http://example.com/pass');
144+
expect(breadcrumbs![0]?.data?.url).toEqual('https://example.com/pass');
145145
},
146146
})
147147
.start(done);
@@ -157,11 +157,11 @@ describe('httpIntegration', () => {
157157

158158
const requestSpans = event.spans?.filter(span => span.op === 'http.client');
159159
expect(requestSpans).toHaveLength(1);
160-
expect(requestSpans![0]?.description).toBe('GET http://example.com/pass');
160+
expect(requestSpans![0]?.description).toBe('GET https://example.com/pass');
161161

162162
const breadcrumbs = event.breadcrumbs?.filter(b => b.category === 'http');
163163
expect(breadcrumbs).toHaveLength(1);
164-
expect(breadcrumbs![0]?.data?.url).toEqual('http://example.com/pass');
164+
expect(breadcrumbs![0]?.data?.url).toEqual('https://example.com/pass');
165165
},
166166
})
167167
.start(done);

0 commit comments

Comments
 (0)