Skip to content

Commit

Permalink
test(instrumentation-http): remove tests for deprecated request packa…
Browse files Browse the repository at this point in the history
…ge (#5328)
  • Loading branch information
pichlermarc authored Jan 13, 2025
1 parent cb88833 commit 6f18ec2
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 752 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@
"mocha": "10.8.2",
"nock": "13.5.6",
"nyc": "17.1.0",
"request": "2.88.2",
"request-promise-native": "1.0.9",
"sinon": "15.1.2",
"superagent": "10.1.1",
"typescript": "5.0.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ instrumentation.enable();
instrumentation.disable();

import * as http from 'http';
import * as request from 'request-promise-native';
import * as superagent from 'superagent';
// Temporarily removed. See /~https://github.com/open-telemetry/opentelemetry-js/issues/3344
// import * as got from 'got';
import * as nock from 'nock';
import * as axios from 'axios';

Expand Down Expand Up @@ -82,11 +79,6 @@ describe('Packages', () => {
[
{ name: 'axios', httpPackage: axios }, //keep first
{ name: 'superagent', httpPackage: superagent },
// { name: 'got', httpPackage: { get: (url: string) => got(url) } },
{
name: 'request',
httpPackage: { get: (url: string) => request(url) },
},
].forEach(({ name, httpPackage }) => {
it(`should create a span for GET requests and add propagation headers by using ${name} package`, async () => {
nock.load(path.join(__dirname, '../', '/fixtures/google-http.json'));
Expand Down Expand Up @@ -123,7 +115,6 @@ describe('Packages', () => {
result.request._headers[DummyPropagation.SPAN_CONTEXT_KEY]
);
break;
case 'got':
case 'superagent':
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ instrumentation.enable();
instrumentation.disable();

import * as http from 'http';
import * as request from 'request-promise-native';
import * as superagent from 'superagent';
// Temporarily removed. See /~https://github.com/open-telemetry/opentelemetry-js/issues/3344
// import * as got from 'got';
import * as nock from 'nock';
import * as axios from 'axios';

Expand Down Expand Up @@ -82,11 +79,6 @@ describe('Packages', () => {
[
{ name: 'axios', httpPackage: axios }, //keep first
{ name: 'superagent', httpPackage: superagent },
// { name: 'got', httpPackage: { get: (url: string) => got(url) } },
{
name: 'request',
httpPackage: { get: (url: string) => request(url) },
},
].forEach(({ name, httpPackage }) => {
it(`should create a span for GET requests and add propagation headers by using ${name} package`, async () => {
nock.load(path.join(__dirname, '../', '/fixtures/google-https.json'));
Expand Down Expand Up @@ -123,7 +115,6 @@ describe('Packages', () => {
result.request._headers[DummyPropagation.SPAN_CONTEXT_KEY]
);
break;
case 'got':
case 'superagent':
break;
default:
Expand Down
Loading

0 comments on commit 6f18ec2

Please sign in to comment.