iotagent-node-lib 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/.github/workflows/ci.yml +1 -0
  2. package/CHANGES_NEXT_RELEASE +2 -0
  3. package/docker-compose-dev.yml +1 -1
  4. package/lib/services/ngsi/entities-NGSI-LD.js +2 -16
  5. package/lib/services/ngsi/entities-NGSI-v2.js +4 -16
  6. package/package.json +2 -2
  7. package/test/unit/general/config-multi-core-test.js +2 -1
  8. package/test/unit/general/contextBrokerKeystoneSecurityAccess-test.js +2 -1
  9. package/test/unit/general/deviceService-test.js +2 -1
  10. package/test/unit/general/loglevel-api_test.js +2 -1
  11. package/test/unit/general/startup-test.js +2 -1
  12. package/test/unit/general/statistics-persistence_test.js +1 -0
  13. package/test/unit/general/statistics-service_test.js +1 -0
  14. package/test/unit/lazyAndCommands/commandRegistry_test.js +1 -0
  15. package/test/unit/memoryRegistry/deviceRegistryMemory_test.js +1 -0
  16. package/test/unit/mongodb/mongodb-connectionoptions-test.js +1 -0
  17. package/test/unit/mongodb/mongodb-group-registry-test.js +1 -0
  18. package/test/unit/mongodb/mongodb-registry-test.js +2 -1
  19. package/test/unit/ngsi-ld/expressions/expressionBasedTransformations-test.js +2 -1
  20. package/test/unit/ngsi-ld/general/config-jsonld-contexts-test.js +2 -1
  21. package/test/unit/ngsi-ld/general/contextBrokerOAuthSecurityAccess-test.js +2 -1
  22. package/test/unit/ngsi-ld/general/deviceService-test.js +2 -1
  23. package/test/unit/ngsi-ld/general/https-support-test.js +2 -1
  24. package/test/unit/ngsi-ld/general/iotam-autoregistration-test.js +2 -1
  25. package/test/unit/ngsi-ld/general/startup-test.js +3 -2
  26. package/test/unit/ngsi-ld/lazyAndCommands/active-devices-attribute-update-test.js +2 -1
  27. package/test/unit/ngsi-ld/lazyAndCommands/command-test.js +5 -7
  28. package/test/unit/ngsi-ld/lazyAndCommands/lazy-devices-test.js +8 -6
  29. package/test/unit/ngsi-ld/lazyAndCommands/merge-patch-test.js +18 -22
  30. package/test/unit/ngsi-ld/lazyAndCommands/polling-commands-test.js +2 -1
  31. package/test/unit/ngsi-ld/ngsiService/active-devices-test.js +2 -1
  32. package/test/unit/ngsi-ld/ngsiService/autocast-test.js +2 -1
  33. package/test/unit/ngsi-ld/ngsiService/geoproperties-test.js +2 -1
  34. package/test/unit/ngsi-ld/ngsiService/languageProperties-test.js +32 -34
  35. package/test/unit/ngsi-ld/ngsiService/staticAttributes-test.js +2 -1
  36. package/test/unit/ngsi-ld/ngsiService/subscriptions-test.js +2 -1
  37. package/test/unit/ngsi-ld/ngsiService/unsupported-endpoints-test.js +11 -15
  38. package/test/unit/ngsi-ld/plugins/alias-plugin_test.js +2 -1
  39. package/test/unit/ngsi-ld/plugins/bidirectional-plugin_test.js +2 -1
  40. package/test/unit/ngsi-ld/plugins/compress-timestamp-plugin_test.js +2 -1
  41. package/test/unit/ngsi-ld/plugins/multientity-plugin_test.js +2 -1
  42. package/test/unit/ngsi-ld/plugins/timestamp-processing-plugin_test.js +2 -1
  43. package/test/unit/ngsi-ld/provisioning/device-provisioning-api_test.js +1 -0
  44. package/test/unit/ngsi-ld/provisioning/device-registration_test.js +2 -1
  45. package/test/unit/ngsi-ld/provisioning/device-update-registration_test.js +15 -12
  46. package/test/unit/ngsi-ld/provisioning/listProvisionedDevices-test.js +1 -0
  47. package/test/unit/ngsi-ld/provisioning/provisionDeviceMultientity-test.js +1 -0
  48. package/test/unit/ngsi-ld/provisioning/removeProvisionedDevice-test.js +1 -0
  49. package/test/unit/ngsi-ld/provisioning/singleConfigurationMode-test.js +1 -0
  50. package/test/unit/ngsi-ld/provisioning/updateProvisionedDevices-test.js +1 -0
  51. package/test/unit/ngsi-mixed/provisioning/ngsi-versioning-test.js +13 -7
  52. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin32.json +6 -0
  53. package/test/unit/ngsiv2/examples/contextRequests/updateContextProcessTimestamp.json +7 -1
  54. package/test/unit/ngsiv2/examples/contextRequests/updateContextTimestampOverride.json +7 -1
  55. package/test/unit/ngsiv2/examples/contextRequests/updateContextTimestampOverrideWithoutMilis.json +7 -1
  56. package/test/unit/ngsiv2/expressions/expressionBasedTransformations-test.js +2 -1
  57. package/test/unit/ngsiv2/expressions/expressionCombinedTransformations-test.js +4 -2
  58. package/test/unit/ngsiv2/expressions/jexlBasedTransformations-test.js +4 -2
  59. package/test/unit/ngsiv2/general/contextBrokerOAuthSecurityAccess-test.js +2 -1
  60. package/test/unit/ngsiv2/general/deviceService-test.js +2 -1
  61. package/test/unit/ngsiv2/general/https-support-test.js +2 -1
  62. package/test/unit/ngsiv2/general/iotam-autoregistration-test.js +2 -1
  63. package/test/unit/ngsiv2/general/startup-test.js +2 -1
  64. package/test/unit/ngsiv2/lazyAndCommands/active-devices-attribute-update-test.js +2 -1
  65. package/test/unit/ngsiv2/lazyAndCommands/command-test.js +2 -1
  66. package/test/unit/ngsiv2/lazyAndCommands/lazy-devices-test.js +8 -6
  67. package/test/unit/ngsiv2/lazyAndCommands/polling-commands-test.js +2 -1
  68. package/test/unit/ngsiv2/ngsiService/active-devices-test.js +3 -2
  69. package/test/unit/ngsiv2/ngsiService/autocast-test.js +2 -1
  70. package/test/unit/ngsiv2/ngsiService/queryDeviceInformationInCb-test.js +2 -1
  71. package/test/unit/ngsiv2/ngsiService/staticAttributes-test.js +2 -1
  72. package/test/unit/ngsiv2/ngsiService/subscriptions-test.js +2 -1
  73. package/test/unit/ngsiv2/plugins/alias-plugin_test.js +2 -1
  74. package/test/unit/ngsiv2/plugins/bidirectional-plugin_test.js +2 -1
  75. package/test/unit/ngsiv2/plugins/compress-timestamp-plugin_test.js +2 -1
  76. package/test/unit/ngsiv2/plugins/multientity-plugin_test.js +2 -1
  77. package/test/unit/ngsiv2/plugins/timestamp-processing-plugin_test.js +2 -1
  78. package/test/unit/ngsiv2/provisioning/device-group-api-test.js +1 -0
  79. package/test/unit/ngsiv2/provisioning/device-group-utils-test.js +1 -0
  80. package/test/unit/ngsiv2/provisioning/device-provisioning-api_test.js +1 -0
  81. package/test/unit/ngsiv2/provisioning/device-registration_test.js +2 -1
  82. package/test/unit/ngsiv2/provisioning/device-update-registration_test.js +15 -12
  83. package/test/unit/ngsiv2/provisioning/listProvisionedDevices-test.js +1 -0
  84. package/test/unit/ngsiv2/provisioning/provisionDeviceMultientity-test.js +1 -0
  85. package/test/unit/ngsiv2/provisioning/removeProvisionedDevice-test.js +1 -0
  86. package/test/unit/ngsiv2/provisioning/singleConfigurationMode-test.js +1 -0
  87. package/test/unit/ngsiv2/provisioning/updateProvisionedDevices-test.js +1 -0
  88. package/test/unit/plugins/capture-configuration-inPlugins_test.js +2 -1
  89. package/test/unit/plugins/capture-provision-inPlugins_test.js +2 -1
@@ -40,7 +40,8 @@ const iotAgentConfig = {
40
40
  jsonLdContext: 'http://context.json-ld'
41
41
  },
42
42
  server: {
43
- port: 4041
43
+ port: 4041,
44
+ host: 'localhost'
44
45
  },
45
46
  types: {},
46
47
  service: 'smartgondor',
@@ -48,7 +49,6 @@ const iotAgentConfig = {
48
49
  providerUrl: 'http://smartgondor.com'
49
50
  };
50
51
 
51
-
52
52
  const iotAgentConfigWithLimitedSupport = {
53
53
  contextBroker: {
54
54
  host: '192.168.1.1',
@@ -58,10 +58,11 @@ const iotAgentConfigWithLimitedSupport = {
58
58
  },
59
59
  server: {
60
60
  port: 4041,
61
- ldSupport : {
62
- null: false,
63
- datasetId: false
64
- }
61
+ host: 'localhost',
62
+ ldSupport: {
63
+ null: false,
64
+ datasetId: false
65
+ }
65
66
  },
66
67
  types: {
67
68
  Robot: {
@@ -91,7 +92,6 @@ const device = {
91
92
  service: 'smartgondor'
92
93
  };
93
94
 
94
-
95
95
  describe('NGSI-LD - Unsupported Endpoints', function () {
96
96
  beforeEach(function (done) {
97
97
  iotAgentLib.activate(iotAgentConfig, function () {
@@ -153,7 +153,6 @@ describe('NGSI-LD - Unsupported Endpoints', function () {
153
153
  });
154
154
  });
155
155
 
156
-
157
156
  it('PUT /entities/<entity-id> includes an NGSI-LD Null should return a valid NSGI-LD error message', function (done) {
158
157
  const options = {
159
158
  url:
@@ -162,7 +161,7 @@ describe('NGSI-LD - Unsupported Endpoints', function () {
162
161
  '/ngsi-ld/v1/entities/urn:ngsi-ld:entity/attrs/att',
163
162
  method: 'PUT',
164
163
  json: {
165
- "value": "urn:ngsi-ld:null"
164
+ value: 'urn:ngsi-ld:null'
166
165
  },
167
166
  headers: {
168
167
  'fiware-service': 'smartgondor',
@@ -194,7 +193,6 @@ describe('NGSI-LD - Limiting Support', function () {
194
193
  .post('/ngsi-ld/v1/entityOperations/upsert/')
195
194
  .reply(204);
196
195
 
197
-
198
196
  iotAgentLib.activate(iotAgentConfigWithLimitedSupport, function () {
199
197
  iotAgentLib.clearAll(function () {
200
198
  done();
@@ -217,7 +215,7 @@ describe('NGSI-LD - Limiting Support', function () {
217
215
  '/ngsi-ld/v1/entities/urn:ngsi-ld:Robot:r2d2/attrs/position',
218
216
  method: 'PATCH',
219
217
  json: {
220
- "value": "urn:ngsi-ld:null"
218
+ value: 'urn:ngsi-ld:null'
221
219
  },
222
220
  headers: {
223
221
  'fiware-service': 'smartgondor',
@@ -235,9 +233,8 @@ describe('NGSI-LD - Limiting Support', function () {
235
233
  done();
236
234
  });
237
235
  });
238
-
239
236
  });
240
- });
237
+ });
241
238
  describe('When sending a payload including a datasetId when datasetIds are unsupported ', function () {
242
239
  it('should return a valid NSGI-LD error message', function (done) {
243
240
  const options = {
@@ -276,7 +273,6 @@ describe('NGSI-LD - Limiting Support', function () {
276
273
  done();
277
274
  });
278
275
  });
279
-
280
276
  });
281
- });
277
+ });
282
278
  });
@@ -41,7 +41,8 @@ const iotAgentConfig = {
41
41
  jsonLdContext: 'http://context.json-ld'
42
42
  },
43
43
  server: {
44
- port: 4041
44
+ port: 4041,
45
+ host: 'localhost'
45
46
  },
46
47
  types: {
47
48
  Light: {
@@ -41,7 +41,8 @@ const iotAgentConfig = {
41
41
  jsonLdContext: 'http://context.json-ld'
42
42
  },
43
43
  server: {
44
- port: 4041
44
+ port: 4041,
45
+ host: 'localhost'
45
46
  },
46
47
  types: {},
47
48
  service: 'smartgondor',
@@ -37,7 +37,8 @@ const iotAgentConfig = {
37
37
  jsonLdContext: 'http://context.json-ld'
38
38
  },
39
39
  server: {
40
- port: 4041
40
+ port: 4041,
41
+ host: 'localhost'
41
42
  },
42
43
  types: {
43
44
  Light: {
@@ -41,7 +41,8 @@ const iotAgentConfig = {
41
41
  jsonLdContext: 'http://context.json-ld'
42
42
  },
43
43
  server: {
44
- port: 4041
44
+ port: 4041,
45
+ host: 'localhost'
45
46
  },
46
47
  types: {
47
48
  WeatherStation: {
@@ -38,7 +38,8 @@ const iotAgentConfig = {
38
38
  jsonLdContext: 'http://context.json-ld'
39
39
  },
40
40
  server: {
41
- port: 4041
41
+ port: 4041,
42
+ host: 'localhost'
42
43
  },
43
44
  types: {
44
45
  Light: {
@@ -42,6 +42,7 @@ const iotAgentConfig = {
42
42
  },
43
43
  server: {
44
44
  port: 4041,
45
+ host: 'localhost',
45
46
  baseRoot: '/'
46
47
  },
47
48
  types: {},
@@ -41,7 +41,8 @@ const iotAgentConfig = {
41
41
  jsonLdContext: 'http://context.json-ld'
42
42
  },
43
43
  server: {
44
- port: 4041
44
+ port: 4041,
45
+ host: 'localhost'
45
46
  },
46
47
  types: {
47
48
  Light: {
@@ -40,7 +40,8 @@ const iotAgentConfig = {
40
40
  jsonLdContext: 'http://context.json-ld'
41
41
  },
42
42
  server: {
43
- port: 4041
43
+ port: 4041,
44
+ host: 'localhost'
44
45
  },
45
46
  types: {
46
47
  Light: {
@@ -244,17 +245,19 @@ describe('NGSI-LD - IoT Agent Device Update Registration', function () {
244
245
  });
245
246
  it('should store the new values in the registry', function (done) {
246
247
  iotAgentLib.updateRegister(deviceCommandUpdated, false, function (error, data) {
247
- iotAgentLib.getDevice(deviceCommandUpdated.id, 'smartgondor', 'gardens', function (
248
- error,
249
- deviceResult
250
- ) {
251
- should.not.exist(error);
252
- should.exist(deviceResult);
253
- deviceResult.internalId.should.equal(deviceUpdated.internalId);
254
- deviceResult.commands[0].name.should.equal('move');
255
- deviceResult.active[0].name.should.equal('temperature');
256
- done();
257
- });
248
+ iotAgentLib.getDevice(
249
+ deviceCommandUpdated.id,
250
+ 'smartgondor',
251
+ 'gardens',
252
+ function (error, deviceResult) {
253
+ should.not.exist(error);
254
+ should.exist(deviceResult);
255
+ deviceResult.internalId.should.equal(deviceUpdated.internalId);
256
+ deviceResult.commands[0].name.should.equal('move');
257
+ deviceResult.active[0].name.should.equal('temperature');
258
+ done();
259
+ }
260
+ );
258
261
  });
259
262
  });
260
263
  });
@@ -43,6 +43,7 @@ const iotAgentConfig = {
43
43
  },
44
44
  server: {
45
45
  port: 4041,
46
+ host: 'localhost',
46
47
  baseRoot: '/'
47
48
  },
48
49
  types: {},
@@ -43,6 +43,7 @@ const iotAgentConfig = {
43
43
  },
44
44
  server: {
45
45
  port: 4041,
46
+ host: 'localhost',
46
47
  baseRoot: '/'
47
48
  },
48
49
  types: {},
@@ -43,6 +43,7 @@ const iotAgentConfig = {
43
43
  },
44
44
  server: {
45
45
  port: 4041,
46
+ host: 'localhost',
46
47
  baseRoot: '/'
47
48
  },
48
49
  types: {},
@@ -43,6 +43,7 @@ const iotAgentConfig = {
43
43
  },
44
44
  server: {
45
45
  port: 4041,
46
+ host: 'localhost',
46
47
  baseRoot: '/'
47
48
  },
48
49
  types: {},
@@ -43,6 +43,7 @@ const iotAgentConfig = {
43
43
  },
44
44
  server: {
45
45
  port: 4041,
46
+ host: 'localhost',
46
47
  baseRoot: '/'
47
48
  },
48
49
  types: {},
@@ -40,6 +40,7 @@ const iotAgentConfig = {
40
40
  server: {
41
41
  name: 'testAgent',
42
42
  port: 4041,
43
+ host: 'localhost',
43
44
  baseRoot: '/'
44
45
  },
45
46
  types: {},
@@ -268,13 +269,18 @@ describe('Mixed Mode: ngsiVersion test', function () {
268
269
  });
269
270
  });
270
271
  it('should operate using NGSI-v2', function (done) {
271
- iotAgentLib.update('light2', 'Device', 'v2-test', values, { ngsiVersion: 'v2', type: 'Device' }, function (
272
- error
273
- ) {
274
- should.not.exist(error);
275
- contextBrokerMock.done();
276
- done();
277
- });
272
+ iotAgentLib.update(
273
+ 'light2',
274
+ 'Device',
275
+ 'v2-test',
276
+ values,
277
+ { ngsiVersion: 'v2', type: 'Device' },
278
+ function (error) {
279
+ should.not.exist(error);
280
+ contextBrokerMock.done();
281
+ done();
282
+ }
283
+ );
278
284
  });
279
285
  });
280
286
  });
@@ -7,6 +7,12 @@
7
7
  52
8
8
  ],
9
9
  "type": "Point"
10
+ },
11
+ "metadata": {
12
+ "TimeInstant": {
13
+ "type": "DateTime",
14
+ "value": "1970-01-01T00:00:00.001Z"
15
+ }
10
16
  }
11
17
  },
12
18
  "TimeInstant": {
@@ -1,7 +1,13 @@
1
1
  {
2
2
  "state":{
3
3
  "type": "Boolean",
4
- "value": true
4
+ "value": true,
5
+ "metadata": {
6
+ "TimeInstant": {
7
+ "type": "DateTime",
8
+ "value": "2016-05-30T16:25:22.304Z"
9
+ }
10
+ }
5
11
  },
6
12
  "TimeInstant":
7
13
  {
@@ -1,7 +1,13 @@
1
1
  {
2
2
  "state": {
3
3
  "value": true,
4
- "type": "boolean"
4
+ "type": "boolean",
5
+ "metadata": {
6
+ "TimeInstant":{
7
+ "type": "DateTime",
8
+ "value": "2015-12-14T08:06:01.468Z"
9
+ }
10
+ }
5
11
  },
6
12
  "TimeInstant":{
7
13
  "type": "DateTime",
@@ -1,7 +1,13 @@
1
1
  {
2
2
  "state": {
3
3
  "value": true,
4
- "type": "boolean"
4
+ "type": "boolean",
5
+ "metadata": {
6
+ "TimeInstant":{
7
+ "type": "DateTime",
8
+ "value": "2022-10-22T22:22:22Z"
9
+ }
10
+ }
5
11
  },
6
12
  "TimeInstant":{
7
13
  "type": "DateTime",
@@ -39,7 +39,8 @@ const iotAgentConfig = {
39
39
  ngsiVersion: 'v2'
40
40
  },
41
41
  server: {
42
- port: 4041
42
+ port: 4041,
43
+ host: 'localhost'
43
44
  },
44
45
  types: {
45
46
  Light: {
@@ -38,7 +38,8 @@ const iotAgentConfigJexl = {
38
38
  ngsiVersion: 'v2'
39
39
  },
40
40
  server: {
41
- port: 4041
41
+ port: 4041,
42
+ host: 'localhost'
42
43
  },
43
44
  defaultExpressionLanguage: 'jexl',
44
45
  types: {
@@ -83,7 +84,8 @@ const iotAgentConfigLegacy = {
83
84
  ngsiVersion: 'v2'
84
85
  },
85
86
  server: {
86
- port: 4041
87
+ port: 4041,
88
+ host: 'localhost'
87
89
  },
88
90
  types: {
89
91
  WeatherStationLegacy: {
@@ -41,7 +41,8 @@ const iotAgentConfig = {
41
41
  },
42
42
  defaultExpressionLanguage: 'jexl',
43
43
  server: {
44
- port: 4041
44
+ port: 4041,
45
+ host: 'localhost'
45
46
  },
46
47
  types: {
47
48
  Light: {
@@ -389,7 +390,8 @@ const iotAgentConfigTS = {
389
390
  },
390
391
  defaultExpressionLanguage: 'jexl',
391
392
  server: {
392
- port: 4041
393
+ port: 4041,
394
+ host: 'localhost'
393
395
  },
394
396
  types: {
395
397
  GPS: {
@@ -42,7 +42,8 @@ const iotAgentConfig = {
42
42
  ngsiVersion: 'v2'
43
43
  },
44
44
  server: {
45
- port: 4041
45
+ port: 4041,
46
+ host: 'localhost'
46
47
  },
47
48
  authentication: {
48
49
  type: 'oauth2',
@@ -40,7 +40,8 @@ const iotAgentConfig = {
40
40
  ngsiVersion: 'v2'
41
41
  },
42
42
  server: {
43
- port: 4041
43
+ port: 4041,
44
+ host: 'localhost'
44
45
  },
45
46
  types: {
46
47
  Light: {
@@ -40,7 +40,8 @@ const iotAgentConfig = {
40
40
  ngsiVersion: 'v2'
41
41
  },
42
42
  server: {
43
- port: 4041
43
+ port: 4041,
44
+ host: 'localhost'
44
45
  },
45
46
  types: {
46
47
  Light: {
@@ -38,7 +38,8 @@ const iotAgentConfig = {
38
38
  ngsiVersion: 'v2'
39
39
  },
40
40
  server: {
41
- port: 4041
41
+ port: 4041,
42
+ host: 'localhost'
42
43
  },
43
44
  types: {
44
45
  Light: {
@@ -39,7 +39,8 @@ const iotAgentConfig = {
39
39
  port: '1026'
40
40
  },
41
41
  server: {
42
- port: 4041
42
+ port: 4041,
43
+ host: 'localhost'
43
44
  },
44
45
  types: {
45
46
  Light: {
@@ -42,7 +42,8 @@ const iotAgentConfig = {
42
42
  ngsiVersion: 'v2'
43
43
  },
44
44
  server: {
45
- port: 4041
45
+ port: 4041,
46
+ host: 'localhost'
46
47
  },
47
48
  types: {
48
49
  Light: {
@@ -43,7 +43,8 @@ const iotAgentConfig = {
43
43
  ngsiVersion: 'v2'
44
44
  },
45
45
  server: {
46
- port: 4041
46
+ port: 4041,
47
+ host: 'localhost'
47
48
  },
48
49
  types: {
49
50
  Light: {
@@ -45,7 +45,8 @@ const iotAgentConfig = {
45
45
  ngsiVersion: 'v2'
46
46
  },
47
47
  server: {
48
- port: 4041
48
+ port: 4041,
49
+ host: 'localhost'
49
50
  },
50
51
  types: {
51
52
  Light: {
@@ -343,11 +344,12 @@ describe('NGSI-v2 - IoT Agent Lazy Devices', function () {
343
344
  .post('/v2/entities?options=upsert')
344
345
  .reply(204);
345
346
 
346
- async.series([apply(iotAgentLib.activate, iotAgentConfig), apply(iotAgentLib.register, device1)], function (
347
- error
348
- ) {
349
- done();
350
- });
347
+ async.series(
348
+ [apply(iotAgentLib.activate, iotAgentConfig), apply(iotAgentLib.register, device1)],
349
+ function (error) {
350
+ done();
351
+ }
352
+ );
351
353
  });
352
354
 
353
355
  it('should not give any error', function (done) {
@@ -43,7 +43,8 @@ const iotAgentConfig = {
43
43
  ngsiVersion: 'v2'
44
44
  },
45
45
  server: {
46
- port: 4041
46
+ port: 4041,
47
+ host: 'localhost'
47
48
  },
48
49
  types: {
49
50
  Light: {
@@ -40,7 +40,8 @@ const iotAgentConfig = {
40
40
  ngsiVersion: 'v2'
41
41
  },
42
42
  server: {
43
- port: 4041
43
+ port: 4041,
44
+ host: 'localhost'
44
45
  },
45
46
  types: {
46
47
  Light: {
@@ -463,7 +464,7 @@ describe('NGSI-v2 - Active attributes test', function () {
463
464
  done();
464
465
  });
465
466
 
466
- it('should not override the received instant and should not add metadatas for this request', function (done) {
467
+ it('should not override the received instant and should add metadatas for this request', function (done) {
467
468
  iotAgentLib.update('light1', 'Light', '', modifiedValues, function (error) {
468
469
  should.not.exist(error);
469
470
  contextBrokerMock.done();
@@ -39,7 +39,8 @@ const iotAgentConfig = {
39
39
  ngsiVersion: 'v2'
40
40
  },
41
41
  server: {
42
- port: 4041
42
+ port: 4041,
43
+ host: 'localhost'
43
44
  },
44
45
  types: {
45
46
  Light: {
@@ -33,7 +33,8 @@ const iotAgentConfig = {
33
33
  ngsiVersion: 'v2'
34
34
  },
35
35
  server: {
36
- port: 4041
36
+ port: 4041,
37
+ host: 'localhost'
37
38
  },
38
39
  types: {
39
40
  Light: {
@@ -38,7 +38,8 @@ const iotAgentConfig = {
38
38
  ngsiVersion: 'v2'
39
39
  },
40
40
  server: {
41
- port: 4041
41
+ port: 4041,
42
+ host: 'localhost'
42
43
  },
43
44
  types: {
44
45
  Light: {
@@ -40,7 +40,8 @@ const iotAgentConfig = {
40
40
  ngsiVersion: 'v2'
41
41
  },
42
42
  server: {
43
- port: 4041
43
+ port: 4041,
44
+ host: 'localhost'
44
45
  },
45
46
  types: {},
46
47
  service: 'smartgondor',
@@ -39,7 +39,8 @@ const iotAgentConfig = {
39
39
  ngsiVersion: 'v2'
40
40
  },
41
41
  server: {
42
- port: 4041
42
+ port: 4041,
43
+ host: 'localhost'
43
44
  },
44
45
  types: {
45
46
  Light: {
@@ -40,7 +40,8 @@ const iotAgentConfig = {
40
40
  ngsiVersion: 'v2'
41
41
  },
42
42
  server: {
43
- port: 4041
43
+ port: 4041,
44
+ host: 'localhost'
44
45
  },
45
46
  types: {},
46
47
  service: 'smartgondor',
@@ -36,7 +36,8 @@ const iotAgentConfig = {
36
36
  ngsiVersion: 'v2'
37
37
  },
38
38
  server: {
39
- port: 4041
39
+ port: 4041,
40
+ host: 'localhost'
40
41
  },
41
42
  types: {
42
43
  Light: {
@@ -41,7 +41,8 @@ const iotAgentConfig = {
41
41
  ngsiVersion: 'v2'
42
42
  },
43
43
  server: {
44
- port: 4041
44
+ port: 4041,
45
+ host: 'localhost'
45
46
  },
46
47
  types: {
47
48
  WeatherStation: {
@@ -36,7 +36,8 @@ const iotAgentConfig = {
36
36
  ngsiVersion: 'v2'
37
37
  },
38
38
  server: {
39
- port: 4041
39
+ port: 4041,
40
+ host: 'localhost'
40
41
  },
41
42
  types: {
42
43
  Light: {
@@ -41,6 +41,7 @@ const iotAgentConfig = {
41
41
  server: {
42
42
  name: 'testAgent',
43
43
  port: 4041,
44
+ host: 'localhost',
44
45
  baseRoot: '/'
45
46
  },
46
47
  types: {},
@@ -56,6 +56,7 @@ const iotAgentConfig = {
56
56
  },
57
57
  server: {
58
58
  port: 4041,
59
+ host: 'localhost',
59
60
  baseRoot: '/'
60
61
  },
61
62
  types: {