Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Updated versioned tests due to update in @newrelic/security-agent V1.3.0 #2239

Merged
merged 4 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ SOFTWARE.

### @newrelic/security-agent

This product includes source derived from [@newrelic/security-agent](https://github.com/newrelic/csec-node-agent) ([v1.2.0](https://github.com/newrelic/csec-node-agent/tree/v1.2.0)), distributed under the [UNKNOWN License](https://github.com/newrelic/csec-node-agent/blob/v1.2.0/LICENSE):
This product includes source derived from [@newrelic/security-agent](https://github.com/newrelic/csec-node-agent) ([v1.3.0](https://github.com/newrelic/csec-node-agent/tree/v1.3.0)), distributed under the [UNKNOWN License](https://github.com/newrelic/csec-node-agent/blob/v1.3.0/LICENSE):

```
## New Relic Software License v1.0
Expand Down Expand Up @@ -886,7 +886,7 @@ SOFTWARE.

### @aws-sdk/client-s3

This product includes source derived from [@aws-sdk/client-s3](https://github.com/aws/aws-sdk-js-v3) ([v3.582.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.582.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.582.0/LICENSE):
This product includes source derived from [@aws-sdk/client-s3](https://github.com/aws/aws-sdk-js-v3) ([v3.587.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.587.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.587.0/LICENSE):

```
Apache License
Expand Down Expand Up @@ -1095,7 +1095,7 @@ This product includes source derived from [@aws-sdk/client-s3](https://github.co

### @aws-sdk/s3-request-presigner

This product includes source derived from [@aws-sdk/s3-request-presigner](https://github.com/aws/aws-sdk-js-v3) ([v3.582.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.582.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.582.0/LICENSE):
This product includes source derived from [@aws-sdk/s3-request-presigner](https://github.com/aws/aws-sdk-js-v3) ([v3.587.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.587.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.587.0/LICENSE):

```
Apache License
Expand Down Expand Up @@ -2493,7 +2493,7 @@ THE SOFTWARE.

### aws-sdk

This product includes source derived from [aws-sdk](https://github.com/aws/aws-sdk-js) ([v2.1626.0](https://github.com/aws/aws-sdk-js/tree/v2.1626.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js/blob/v2.1626.0/LICENSE.txt):
This product includes source derived from [aws-sdk](https://github.com/aws/aws-sdk-js) ([v2.1631.0](https://github.com/aws/aws-sdk-js/tree/v2.1631.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js/blob/v2.1631.0/LICENSE.txt):

```

Expand Down Expand Up @@ -2892,7 +2892,7 @@ THE SOFTWARE.

### eslint-plugin-jsdoc

This product includes source derived from [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) ([v48.2.5](https://github.com/gajus/eslint-plugin-jsdoc/tree/v48.2.5)), distributed under the [BSD-3-Clause License](https://github.com/gajus/eslint-plugin-jsdoc/blob/v48.2.5/LICENSE):
This product includes source derived from [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) ([v48.2.7](https://github.com/gajus/eslint-plugin-jsdoc/tree/v48.2.7)), distributed under the [BSD-3-Clause License](https://github.com/gajus/eslint-plugin-jsdoc/blob/v48.2.7/LICENSE):

```
Copyright (c) 2018, Gajus Kuizinas (http://gajus.com/)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
"@grpc/grpc-js": "^1.9.4",
"@grpc/proto-loader": "^0.7.5",
"@newrelic/ritm": "^7.2.0",
"@newrelic/security-agent": "^1.1.1",
"@newrelic/security-agent": "^1.3.0",
"@tyriar/fibonacci-heap": "^2.0.7",
"concat-stream": "^2.0.0",
"https-proxy-agent": "^7.0.1",
Expand Down
2 changes: 1 addition & 1 deletion test/versioned/express/ignoring.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test('ignoring an Express route', function (t) {

const metrics = agent.metrics._metrics.unscoped
// loading k2 adds instrumentation metrics for things it loads
const expectedMetrics = helper.isSecurityAgentEnabled(agent) ? 9 : 3
const expectedMetrics = helper.isSecurityAgentEnabled(agent) ? 11 : 3
t.equal(
Object.keys(metrics).length,
expectedMetrics,
Expand Down
2 changes: 1 addition & 1 deletion test/versioned/hapi/ignoring.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test('ignoring a Hapi route', function (t) {

const metrics = agent.metrics._metrics.unscoped
// loading k2 adds instrumentation metrics for packages it instruments
const expectedMetrics = helper.isSecurityAgentEnabled(agent) ? 10 : 3
const expectedMetrics = helper.isSecurityAgentEnabled(agent) ? 11 : 3
t.equal(
Object.keys(metrics).length,
expectedMetrics,
Expand Down
8 changes: 1 addition & 7 deletions test/versioned/restify/pre-7/ignoring.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@
const test = require('tap').test
const helper = require('../../../lib/agent_helper')
const API = require('../../../../api')
const semver = require('semver')

test('Restify router introspection', function (t) {
t.plan(7)

const agent = helper.instrumentMockedAgent()
const api = new API(agent)
const { version: pkgVersion } = require('restify/package')
const server = require('restify').createServer()

t.teardown(function () {
Expand All @@ -39,11 +37,7 @@ test('Restify router introspection', function (t) {
// loading k2 adds instrumentation metrics for things it registers
// this also differs between major versions of restify. 6+ also loads
// k2 child_process instrumentation, fun fun fun
const expectedMetrics = helper.isSecurityAgentEnabled(agent)
? semver.lt(pkgVersion, 'v6.0.0')
? 14
: 15
: 7
const expectedMetrics = helper.isSecurityAgentEnabled(agent) ? 15 : 7
t.equal(
Object.keys(metrics).length,
expectedMetrics,
Expand Down
44 changes: 22 additions & 22 deletions third_party_manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"lastUpdated": "Wed May 29 2024 17:25:34 GMT-0400 (Eastern Daylight Time)",
"lastUpdated": "Mon Jun 03 2024 11:14:52 GMT+0530 (India Standard Time)",
"projectName": "New Relic Node Agent",
"projectUrl": "https://github.com/newrelic/node-newrelic",
"includeOptDeps": true,
Expand Down Expand Up @@ -82,15 +82,15 @@
"email": "w@tson.dk",
"url": "https://twitter.com/wa7son"
},
"@newrelic/security-agent@1.2.0": {
"@newrelic/security-agent@1.3.0": {
"name": "@newrelic/security-agent",
"version": "1.2.0",
"range": "^1.1.1",
"version": "1.3.0",
"range": "^1.3.0",
"licenses": "UNKNOWN",
"repoUrl": "https://github.com/newrelic/csec-node-agent",
"versionedRepoUrl": "https://github.com/newrelic/csec-node-agent/tree/v1.2.0",
"versionedRepoUrl": "https://github.com/newrelic/csec-node-agent/tree/v1.3.0",
"licenseFile": "node_modules/@newrelic/security-agent/LICENSE",
"licenseUrl": "https://github.com/newrelic/csec-node-agent/blob/v1.2.0/LICENSE",
"licenseUrl": "https://github.com/newrelic/csec-node-agent/blob/v1.3.0/LICENSE",
"licenseTextSource": "file",
"publisher": "newrelic"
},
Expand Down Expand Up @@ -226,28 +226,28 @@
}
},
"devDependencies": {
"@aws-sdk/client-s3@3.582.0": {
"@aws-sdk/client-s3@3.587.0": {
"name": "@aws-sdk/client-s3",
"version": "3.582.0",
"version": "3.587.0",
"range": "^3.556.0",
"licenses": "Apache-2.0",
"repoUrl": "https://github.com/aws/aws-sdk-js-v3",
"versionedRepoUrl": "https://github.com/aws/aws-sdk-js-v3/tree/v3.582.0",
"versionedRepoUrl": "https://github.com/aws/aws-sdk-js-v3/tree/v3.587.0",
"licenseFile": "node_modules/@aws-sdk/client-s3/LICENSE",
"licenseUrl": "https://github.com/aws/aws-sdk-js-v3/blob/v3.582.0/LICENSE",
"licenseUrl": "https://github.com/aws/aws-sdk-js-v3/blob/v3.587.0/LICENSE",
"licenseTextSource": "file",
"publisher": "AWS SDK for JavaScript Team",
"url": "https://aws.amazon.com/javascript/"
},
"@aws-sdk/s3-request-presigner@3.582.0": {
"@aws-sdk/s3-request-presigner@3.587.0": {
"name": "@aws-sdk/s3-request-presigner",
"version": "3.582.0",
"version": "3.587.0",
"range": "^3.556.0",
"licenses": "Apache-2.0",
"repoUrl": "https://github.com/aws/aws-sdk-js-v3",
"versionedRepoUrl": "https://github.com/aws/aws-sdk-js-v3/tree/v3.582.0",
"versionedRepoUrl": "https://github.com/aws/aws-sdk-js-v3/tree/v3.587.0",
"licenseFile": "node_modules/@aws-sdk/s3-request-presigner/LICENSE",
"licenseUrl": "https://github.com/aws/aws-sdk-js-v3/blob/v3.582.0/LICENSE",
"licenseUrl": "https://github.com/aws/aws-sdk-js-v3/blob/v3.587.0/LICENSE",
"licenseTextSource": "file",
"publisher": "AWS SDK for JavaScript Team",
"url": "https://aws.amazon.com/javascript/"
Expand Down Expand Up @@ -376,15 +376,15 @@
"licenseTextSource": "file",
"publisher": "Caolan McMahon"
},
"aws-sdk@2.1626.0": {
"aws-sdk@2.1631.0": {
"name": "aws-sdk",
"version": "2.1626.0",
"version": "2.1631.0",
"range": "^2.1604.0",
"licenses": "Apache-2.0",
"repoUrl": "https://github.com/aws/aws-sdk-js",
"versionedRepoUrl": "https://github.com/aws/aws-sdk-js/tree/v2.1626.0",
"versionedRepoUrl": "https://github.com/aws/aws-sdk-js/tree/v2.1631.0",
"licenseFile": "node_modules/aws-sdk/LICENSE.txt",
"licenseUrl": "https://github.com/aws/aws-sdk-js/blob/v2.1626.0/LICENSE.txt",
"licenseUrl": "https://github.com/aws/aws-sdk-js/blob/v2.1631.0/LICENSE.txt",
"licenseTextSource": "file",
"publisher": "Amazon Web Services",
"url": "https://aws.amazon.com/"
Expand Down Expand Up @@ -480,15 +480,15 @@
"publisher": "Michael Radionov",
"url": "https://github.com/mradionov"
},
"eslint-plugin-jsdoc@48.2.5": {
"eslint-plugin-jsdoc@48.2.7": {
"name": "eslint-plugin-jsdoc",
"version": "48.2.5",
"version": "48.2.7",
"range": "^48.0.5",
"licenses": "BSD-3-Clause",
"repoUrl": "https://github.com/gajus/eslint-plugin-jsdoc",
"versionedRepoUrl": "https://github.com/gajus/eslint-plugin-jsdoc/tree/v48.2.5",
"versionedRepoUrl": "https://github.com/gajus/eslint-plugin-jsdoc/tree/v48.2.7",
"licenseFile": "node_modules/eslint-plugin-jsdoc/LICENSE",
"licenseUrl": "https://github.com/gajus/eslint-plugin-jsdoc/blob/v48.2.5/LICENSE",
"licenseUrl": "https://github.com/gajus/eslint-plugin-jsdoc/blob/v48.2.7/LICENSE",
"licenseTextSource": "file",
"publisher": "Gajus Kuizinas",
"email": "gajus@gajus.com",
Expand Down
Loading