Skip to content

Commit

Permalink
Updated to latest version of event-sdk (#143)
Browse files Browse the repository at this point in the history
Fixed linting and unit tests for the latest version of Event-SDK
  • Loading branch information
mdebarros authored Dec 10, 2019
1 parent 352b54e commit 22b06da
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
23 changes: 15 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@mojaloop/central-services-shared",
"version": "8.6.4",
"version": "8.7.0",
"description": "Shared code for central services",
"main": "src/index.js",
"scripts": {
"test": "npm run test:unit | faucet",
"test": "npm run test:unit | npx faucet",
"pretest": "standard",
"standard": "standard",
"test:unit": "tapes 'test/unit/**/**.test.js'",
Expand Down Expand Up @@ -46,7 +46,7 @@
"@hapi/catbox-memory": "4.1.1",
"@mojaloop/central-services-error-handling": "8.6.2",
"@mojaloop/central-services-logger": "8.6.0",
"@mojaloop/event-sdk": "8.6.1",
"@mojaloop/event-sdk": "8.6.2",
"axios": "0.19.0",
"base64url": "3.0.1",
"clone": "2.1.2",
Expand Down
9 changes: 5 additions & 4 deletions test/unit/util/hapi/plugins/eventPlugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,14 @@ Test('Event plugin test', async (pluginTest) => {
tags: ['sampled']
}
})

const traceId = '9732ca939fbd9f755b5bc07c227c4cd5'
const spanId = '74c6557725f1f0e1'
const response = await server.inject({
method: 'POST',
url: '/',
headers: {
tracestate: 'acmevendor=12312312',
traceparent: '00-9732ca939fbd9f755b5bc07c227c4cd5-acd6fbed1e66219c-00'
tracestate: `acmevendor=${spanId}`,
traceparent: `00-${traceId}-${spanId}-00`
}
})

Expand All @@ -113,7 +114,7 @@ Test('Event plugin test', async (pluginTest) => {
assert.ok(span.isFinished)
assert.equal(span.spanContext.service, 'test_route')
assert.equal(span.spanContext.traceId, '9732ca939fbd9f755b5bc07c227c4cd5')
assert.equal(span.spanContext.parentSpanId, 'acd6fbed1e66219c')
assert.equal(span.spanContext.parentSpanId, spanId)

assert.end()
} catch (e) {
Expand Down

0 comments on commit 22b06da

Please sign in to comment.