From e3003304869cbbffd6e2e1abc507a7585135d54d Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Thu, 5 Oct 2023 16:13:41 +0200 Subject: [PATCH 1/5] replace static -> staticAttributes --- .../contextRequests/updateContextMultientityPlugin10.json | 8 ++++++++ test/unit/ngsiv2/plugins/multientity-plugin_test.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin10.json b/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin10.json index b70e5e4a0..c5d1d52b4 100644 --- a/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin10.json +++ b/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin10.json @@ -4,6 +4,14 @@ { "id": "ws9", "type": "WeatherStation", + "st1": { + "value": 1, + "type": "Number" + }, + "st2": { + "value": 2, + "type": "Number" + }, "vol": { "type": "Number", "value": 0 diff --git a/test/unit/ngsiv2/plugins/multientity-plugin_test.js b/test/unit/ngsiv2/plugins/multientity-plugin_test.js index cea20c32c..c7d423042 100644 --- a/test/unit/ngsiv2/plugins/multientity-plugin_test.js +++ b/test/unit/ngsiv2/plugins/multientity-plugin_test.js @@ -272,7 +272,7 @@ const iotAgentConfig = { commands: [], type: 'WeatherStation', lazy: [], - static: [ + staticAttributes: [ { name: 'st1', type: 'Number', From 96d076a56ff51ee48a3beb481bc90f66b8d491a4 Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Thu, 5 Oct 2023 16:45:01 +0200 Subject: [PATCH 2/5] fix test --- .../contextRequests/updateContextMultientityPlugin10.json | 8 -------- test/unit/ngsiv2/plugins/multientity-plugin_test.js | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin10.json b/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin10.json index c5d1d52b4..b70e5e4a0 100644 --- a/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin10.json +++ b/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin10.json @@ -4,14 +4,6 @@ { "id": "ws9", "type": "WeatherStation", - "st1": { - "value": 1, - "type": "Number" - }, - "st2": { - "value": 2, - "type": "Number" - }, "vol": { "type": "Number", "value": 0 diff --git a/test/unit/ngsiv2/plugins/multientity-plugin_test.js b/test/unit/ngsiv2/plugins/multientity-plugin_test.js index c7d423042..d45775c83 100644 --- a/test/unit/ngsiv2/plugins/multientity-plugin_test.js +++ b/test/unit/ngsiv2/plugins/multientity-plugin_test.js @@ -600,7 +600,7 @@ const iotAgentConfig = { describe('NGSI-v2 - Multi-entity plugin', function () { beforeEach(function (done) { - logger.setLevel('DEBUG'); + logger.setLevel('FATAL'); iotAgentLib.activate(iotAgentConfig, function () { iotAgentLib.clearAll(function () { @@ -1120,7 +1120,7 @@ describe('NGSI-v2 - Multi-entity plugin', function () { .post( '/v2/op/update', utils.readExampleFile( - './test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin10.json' + './test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin10b.json' ) ) .reply(204); From c6bba3d9c634ae172fade41a986e20659f7e2fd0 Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Thu, 5 Oct 2023 16:53:25 +0200 Subject: [PATCH 3/5] add new file --- .../updateContextMultientityPlugin10b.json | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin10b.json diff --git a/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin10b.json b/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin10b.json new file mode 100644 index 000000000..c5d1d52b4 --- /dev/null +++ b/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin10b.json @@ -0,0 +1,37 @@ +{ + "actionType": "append", + "entities": [ + { + "id": "ws9", + "type": "WeatherStation", + "st1": { + "value": 1, + "type": "Number" + }, + "st2": { + "value": 2, + "type": "Number" + }, + "vol": { + "type": "Number", + "value": 0 + } + }, + { + "vol": { + "type": "Number", + "value": 100 + }, + "type": "WeatherStation", + "id": "WeatherStation1" + }, + { + "vol": { + "type": "Number", + "value": 200 + }, + "type": "WeatherStation", + "id": "WeatherStation2" + } + ] +} From db686439e6b31283dd5efd016fc7644735799a74 Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Fri, 6 Oct 2023 09:12:04 +0200 Subject: [PATCH 4/5] replace static -> staticAttributes --- test/unit/ngsiv2/plugins/multientity-plugin_test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/ngsiv2/plugins/multientity-plugin_test.js b/test/unit/ngsiv2/plugins/multientity-plugin_test.js index d45775c83..fe8dd26ef 100644 --- a/test/unit/ngsiv2/plugins/multientity-plugin_test.js +++ b/test/unit/ngsiv2/plugins/multientity-plugin_test.js @@ -564,7 +564,7 @@ const iotAgentConfig = { object_id: 'y' } ], - static: [ + staticAttributes: [ { name: 'bar', type: 'text', From e3645e6d5b5a00e5781eacbe2b2cd645b871adca Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Fri, 6 Oct 2023 09:16:46 +0200 Subject: [PATCH 5/5] Update test: static -> staticAttributes --- .../expressions/jexlBasedTransformations-test.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/unit/ngsiv2/expressions/jexlBasedTransformations-test.js b/test/unit/ngsiv2/expressions/jexlBasedTransformations-test.js index 2d8551d69..fa2996c1d 100644 --- a/test/unit/ngsiv2/expressions/jexlBasedTransformations-test.js +++ b/test/unit/ngsiv2/expressions/jexlBasedTransformations-test.js @@ -271,7 +271,7 @@ const iotAgentConfig = { commands: [], type: 'GPS', lazy: [], - static: [ + staticAttributes: [ { name: 'color', type: 'string', @@ -295,7 +295,7 @@ const iotAgentConfig = { commands: [], type: 'GPS', lazy: [], - static: [ + staticAttributes: [ { name: 'color', type: 'string', @@ -319,7 +319,7 @@ const iotAgentConfig = { commands: [], type: 'GPS', lazy: [], - static: [ + staticAttributes: [ { name: 'color', type: 'string', @@ -343,7 +343,7 @@ const iotAgentConfig = { commands: [], type: 'GPS', lazy: [], - static: [ + staticAttributes: [ { name: 'lat', type: 'string', @@ -368,7 +368,7 @@ const iotAgentConfig = { commands: [], type: 'GPS', lazy: [], - static: [ + staticAttributes: [ { name: 'lat', type: 'Number', @@ -393,7 +393,7 @@ const iotAgentConfig = { commands: [], type: 'GPS', lazy: [], - static: [ + staticAttributes: [ { name: 'color', type: 'string',