diff --git a/package-lock.json b/package-lock.json index e2cfefca..aa185c8f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@mojaloop/central-services-shared", - "version": "8.6.4", + "version": "8.7.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -541,9 +541,9 @@ } }, "@mojaloop/event-sdk": { - "version": "8.6.1", - "resolved": "https://registry.npmjs.org/@mojaloop/event-sdk/-/event-sdk-8.6.1.tgz", - "integrity": "sha512-vzxOQ5JzBgXHE9HU3we4Lad1a9DxJN/qpp5IwHPwxFZy3hEDzyOy32ib4RKh4CEu5umFIg9FL1qWjGkBgdnxFw==", + "version": "8.6.2", + "resolved": "https://registry.npmjs.org/@mojaloop/event-sdk/-/event-sdk-8.6.2.tgz", + "integrity": "sha512-ZeQffxnRNU7+/2PF2viuje2F5cz5EvvDkfajYZJtL9SBPxPqHlXxEV+J3FmHsM8JMDMr5j8rDwz++mVCyYj8Kw==", "requires": { "@grpc/proto-loader": "0.5.3", "@mojaloop/central-services-logger": "8.6.0", @@ -553,7 +553,7 @@ "grpc": "1.24.2", "lodash": "4.17.15", "moment": "2.24.0", - "parse-strings-in-object": "1.2.0", + "parse-strings-in-object": "2.0.0", "protobufjs": "6.8.8", "rc": "1.2.8", "serialize-error": "4.1.0", @@ -561,6 +561,13 @@ "traceparent": "1.0.0", "tslib": "1.10.0", "uuid4": "1.1.4" + }, + "dependencies": { + "parse-strings-in-object": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-strings-in-object/-/parse-strings-in-object-2.0.0.tgz", + "integrity": "sha512-hb50xDyEo8boMtyzB1IdVE4KcTNVbIirk/ZqC8na1irOf/70DyZS30y1FIIAUe9jyHJk9s2QoZ4aBNHR9NXHsg==" + } } }, "@mojaloop/sdk-standard-components": { @@ -692,9 +699,9 @@ "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" }, "@types/node": { - "version": "10.17.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.6.tgz", - "integrity": "sha512-0a2X6cgN3RdPBL2MIlR6Lt0KlM7fOFsutuXcdglcOq6WvLnYXgPQSh0Mx6tO1KCAE8MxbHSOSTWDoUxRq+l3DA==" + "version": "10.17.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.8.tgz", + "integrity": "sha512-FeTtEwXbQa187ABpeEQoO7pq3dHgE85FmAUExx2sKO6U1/MYrLTYv+BIMcgVbQ66WjI4w+Ni+5HJtY+gHgWnPg==" }, "@types/protobufjs": { "version": "6.0.0", diff --git a/package.json b/package.json index c96434df..2eb4f02e 100644 --- a/package.json +++ b/package.json @@ -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'", @@ -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", diff --git a/test/unit/util/hapi/plugins/eventPlugin.test.js b/test/unit/util/hapi/plugins/eventPlugin.test.js index 4363d698..4b200dbd 100644 --- a/test/unit/util/hapi/plugins/eventPlugin.test.js +++ b/test/unit/util/hapi/plugins/eventPlugin.test.js @@ -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` } }) @@ -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) {