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

test: Updated fastify versioned tests to work with [email protected] #2584

Merged
merged 1 commit into from
Sep 17, 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
4 changes: 2 additions & 2 deletions test/versioned/fastify/add-hook.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ tap.test('fastify hook instrumentation', (t) => {
t.assertSegments(transaction.trace.root, expectedSegments)
})

await fastify.listen(0)
await fastify.listen({ port: 0 })
const address = fastify.server.address()
const result = await common.makeRequest(address, '/add-hook')
t.same(result, { hello: 'world' })
Expand Down Expand Up @@ -164,7 +164,7 @@ tap.test('fastify hook instrumentation', (t) => {
t.assertSegments(transaction.trace.root, expectedSegments)
})

await fastify.listen(0)
await fastify.listen({ port: 0 })
const address = fastify.server.address()
const result = await common.makeRequest(address, '/error')
t.ok(ok)
Expand Down
2 changes: 1 addition & 1 deletion test/versioned/fastify/code-level-metrics-hooks.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ tap.test('Fastify CLM Hook Based', (test) => {
})
})

await fastify.listen(0)
await fastify.listen({ port: 0 })
const address = fastify.server.address()
const result = await common.makeRequest(address, '/add-hook')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ tap.test('Fastify CLM Middleware Based', (test) => {
assertSegments(t, transaction.trace.root.children[0], isCLMEnabled)
})

await fastify.listen(0)
await fastify.listen({ port: 0 })
const address = fastify.server.address()
const result = await common.makeRequest(address, uri)

Expand Down
2 changes: 1 addition & 1 deletion test/versioned/fastify/errors.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ tap.test('Test Errors', async (test) => {
next(err)
})

await fastify.listen(0)
await fastify.listen({ port: 0 })
const address = fastify.server.address()
const res = await makeRequest(address, '/404-via-reply')
test.equal(res.statusCode, 404)
Expand Down
2 changes: 1 addition & 1 deletion test/versioned/fastify/naming-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = function createTests(t, getExpectedSegments) {
t.assertSegments(transaction.trace.root, expectedSegments)
})

await fastify.listen(0)
await fastify.listen({ port: 0 })
const address = fastify.server.address()
const result = await makeRequest(address, uri)
t.equal(result.called, uri, `${uri} url did not error`)
Expand Down
4 changes: 2 additions & 2 deletions test/versioned/fastify/new-state-tracking.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ tap.test('fastify with new state tracking', (t) => {
return { hello: 'world' }
})

await fastify.listen(0)
await fastify.listen({ port: 0 })

const address = fastify.server.address()

Expand Down Expand Up @@ -65,7 +65,7 @@ tap.test('fastify with new state tracking', (t) => {
})
}

await fastify.listen(0)
await fastify.listen({ port: 0 })

const address = fastify.server.address()

Expand Down
Loading