Skip to content

Commit

Permalink
split test naming schema from test code
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordi Bertran de Balanda committed Apr 20, 2023
1 parent a5f34ff commit ca5d3e1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 24 deletions.
25 changes: 1 addition & 24 deletions packages/datadog-plugin-rhea/test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,7 @@
const { expect } = require('chai')
const agent = require('../../dd-trace/test/plugins/agent')
const { ERROR_MESSAGE, ERROR_TYPE, ERROR_STACK } = require('../../dd-trace/src/constants')
const { resolveNaming } = require('../../dd-trace/test/plugins/helpers')

const namingSchema = resolveNaming({
send: {
v0: {
opName: 'amqp.send',
serviceName: 'test-amqp-producer'
},
v1: {
opName: 'amqp.send',
serviceName: 'test'
}
},
receive: {
v0: {
opName: 'amqp.receive',
serviceName: 'test'
},
v1: {
opName: 'amqp.process',
serviceName: 'test'
}
}
})
const namingSchema = require('./naming')

describe('Plugin', () => {
let tracer
Expand Down
24 changes: 24 additions & 0 deletions packages/datadog-plugin-rhea/test/naming.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const { resolveNaming } = require('../../dd-trace/test/plugins/helpers')

module.exports = resolveNaming({
send: {
v0: {
opName: 'amqp.send',
serviceName: 'test-amqp-producer'
},
v1: {
opName: 'amqp.send',
serviceName: 'test'
}
},
receive: {
v0: {
opName: 'amqp.receive',
serviceName: 'test'
},
v1: {
opName: 'amqp.process',
serviceName: 'test'
}
}
})

0 comments on commit ca5d3e1

Please sign in to comment.