Skip to content

Commit 49e10d5

Browse files
trentmPeterEinberger
authored andcommitted
test: workaround Azure Functions test failures on node >=18.x (elastic#3281)
Just skip them until Azure/azure-functions-core-tools#3335 is resolved. This also bumps the azure-functions-core-tools dep and sets up dependabot for that package. Refs: elastic#3279
1 parent 683e6d0 commit 49e10d5

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ updates:
88
reviewers:
99
- "elastic/apm-agent-node-js"
1010

11+
- package-ecosystem: "npm"
12+
directory: "/test/instrumentation/azure-functions/fixtures/AJsAzureFnApp"
13+
schedule:
14+
interval: "weekly"
15+
open-pull-requests-limit: 5
16+
reviewers:
17+
- "elastic/apm-agent-node-js"
18+
1119
- package-ecosystem: "npm"
1220
directory: "/test/instrumentation/modules/next/a-nextjs-app"
1321
schedule:

test/instrumentation/azure-functions/azure-functions.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ const treekill = require('tree-kill')
2020
const { MockAPMServer } = require('../../_mock_apm_server')
2121
const { formatForTComment } = require('../../_utils')
2222

23-
if (!semver.satisfies(process.version, '>=14 <19')) {
23+
if (semver.satisfies(process.version, '>=18')) {
24+
console.log(`# SKIP azure-functions-core-tools is currently busted for node >=18.x (currently running node ${process.version}): see https://github.com/elastic/apm-agent-nodejs/issues/3279 and https://github.com/Azure/azure-functions-core-tools/issues/3335`)
25+
process.exit()
26+
} else if (!semver.satisfies(process.version, '>=14 <19')) {
2427
console.log(`# SKIP Azure Functions runtime ~4 does not support node ${process.version} (https://aka.ms/functions-node-versions)`)
2528
process.exit()
2629
} else if (os.platform() === 'win32') {

test/instrumentation/azure-functions/fixtures/AJsAzureFnApp/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/instrumentation/azure-functions/fixtures/AJsAzureFnApp/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"start": "func start",
88
"test": "echo \"No tests yet...\""
99
},
10-
"dependencies": {},
1110
"devDependencies": {
12-
"azure-functions-core-tools": "^4.0.4915"
11+
"azure-functions-core-tools": "^4.0.5095"
1312
}
1413
}

0 commit comments

Comments
 (0)