Skip to content

Commit

Permalink
test: Updated fastify versioned tests to work with [email protected] (n…
Browse files Browse the repository at this point in the history
  • Loading branch information
bizob2828 authored Sep 17, 2024
1 parent 3766ed6 commit a5a1526
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
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

0 comments on commit a5a1526

Please sign in to comment.