iotagent-node-lib 4.8.0 → 4.9.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.
- package/.github/workflows/ci.yml +4 -1
- package/.nyc_output/e4b1fe20-197e-4221-9f8d-6db65ff234b2.json +1 -0
- package/.nyc_output/processinfo/e4b1fe20-197e-4221-9f8d-6db65ff234b2.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -0
- package/Changelog +785 -0
- package/doc/admin.md +8 -4
- package/doc/api.md +1 -1
- package/lib/commonConfig.js +11 -2
- package/lib/services/common/domain.js +4 -3
- package/lib/services/devices/devices-NGSI-LD.js +1 -2
- package/lib/services/devices/devices-NGSI-v2.js +1 -2
- package/lib/services/ngsi/entities-NGSI-LD.js +69 -13
- package/lib/services/ngsi/ngsiService.js +3 -1
- package/lib/services/northBound/contextServer-NGSI-LD.js +5 -3
- package/lib/services/northBound/northboundServer.js +1 -1
- package/lib/services/northBound/restUtils.js +6 -2
- package/package.json +1 -1
- package/test/functional/config-test.js +1 -1
- package/test/unit/ngsi-ld/examples/contextRequests/createDatetimeProvisionedDevice.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/createProvisionedDevice.json +3 -12
- package/test/unit/ngsi-ld/examples/contextRequests/createProvisionedDeviceMultientity.json +3 -12
- package/test/unit/ngsi-ld/examples/contextRequests/createProvisionedDeviceWithGroupAndStatic.json +6 -24
- package/test/unit/ngsi-ld/examples/contextRequests/createProvisionedDeviceWithGroupAndStatic2.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContext1.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContext3WithStatic.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContext4.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContext5.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAliasPlugin6.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAliasPlugin7.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAliasPlugin8.json +4 -2
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAliasPlugin9.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextCommandError.json +3 -9
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextCommandExpired.json +13 -19
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextCommandFinish.json +13 -19
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextCommandStatus1.json +4 -9
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextCompressTimestamp1.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextCompressTimestamp2.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin1a.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin2.json +2 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin29.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin4.json +2 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin4a.json +3 -12
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin6.json +3 -5
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin7.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin8a.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextJsonProperty.json +13 -0
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextListProperty.json +14 -0
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextListRelationship.json +14 -0
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin1.json +2 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin2.json +2 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin3.json +3 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin4.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin5.json +2 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin8.json +2 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityTimestampPlugin1.json +2 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityTimestampPlugin2.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityTimestampPlugin3.json +1 -4
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityTimestampPlugin4.json +2 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextRelationship.json +11 -0
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextValueType1.json +51 -0
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextValueType2.json +65 -0
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextVocabProperty.json +11 -0
- package/test/unit/ngsi-ld/examples/contextRequests/updateProvisionCommands1.json +2 -8
- package/test/unit/ngsi-ld/examples/contextRequests/updateProvisionDeviceStatic.json +1 -4
- package/test/unit/ngsi-ld/general/startup-test.js +3 -0
- package/test/unit/ngsi-ld/lazyAndCommands/command-test.js +1 -1
- package/test/unit/ngsi-ld/lazyAndCommands/lazy-devices-test.js +71 -1
- package/test/unit/ngsi-ld/ngsiService/attributeTypes-test.js +293 -0
- package/test/unit/ngsi-ld/ngsiService/unsupported-endpoints-test.js +0 -10
- package/test/unit/ngsi-ld/ngsiService/value-types-test.js +221 -0
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast1.json +0 -11
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast10.json +0 -14
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast2.json +0 -11
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast3.json +0 -11
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast4.json +0 -11
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast5.json +0 -7
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast6.json +0 -17
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast7.json +0 -19
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast8.json +0 -14
- package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast9.json +0 -14
- package/test/unit/ngsi-ld/ngsiService/languageProperties-test.js +0 -109
- package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast1.json +0 -8
- package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast2.json +0 -8
- package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast3.json +0 -8
- package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast4.json +0 -8
- package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast5.json +0 -8
- package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast6.json +0 -8
- package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast7.json +0 -8
- /package/test/unit/ngsi-ld/examples/contextRequests/{updateContextLanguageProperties1.json → updateContextLanguageProperty.json} +0 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U
|
|
3
|
+
*
|
|
4
|
+
* This file is part of fiware-iotagent-lib
|
|
5
|
+
*
|
|
6
|
+
* fiware-iotagent-lib is free software: you can redistribute it and/or
|
|
7
|
+
* modify it under the terms of the GNU Affero General Public License as
|
|
8
|
+
* published by the Free Software Foundation, either version 3 of the License,
|
|
9
|
+
* or (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* fiware-iotagent-lib is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
14
|
+
* See the GNU Affero General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU Affero General Public
|
|
17
|
+
* License along with fiware-iotagent-lib.
|
|
18
|
+
* If not, seehttp://www.gnu.org/licenses/.
|
|
19
|
+
*
|
|
20
|
+
* For those usages not covered by the GNU Affero General Public License
|
|
21
|
+
* please contact with::[contacto@tid.es]
|
|
22
|
+
*
|
|
23
|
+
* Developed by: Federico M. Facca - Martel Innovate
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/* jshint camelcase: false */
|
|
27
|
+
|
|
28
|
+
const iotAgentLib = require('../../../../lib/fiware-iotagent-lib');
|
|
29
|
+
const utils = require('../../../tools/utils');
|
|
30
|
+
const should = require('should');
|
|
31
|
+
const nock = require('nock');
|
|
32
|
+
let contextBrokerMock;
|
|
33
|
+
const iotAgentConfig = {
|
|
34
|
+
logLevel: 'FATAL',
|
|
35
|
+
contextBroker: {
|
|
36
|
+
host: '192.168.1.1',
|
|
37
|
+
port: '1026',
|
|
38
|
+
ngsiVersion: 'ld',
|
|
39
|
+
jsonLdContext: 'http://context.json-ld'
|
|
40
|
+
},
|
|
41
|
+
server: {
|
|
42
|
+
port: 4041,
|
|
43
|
+
ldSupport: {
|
|
44
|
+
dataType: 'valueType'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
types: {
|
|
48
|
+
Light: {
|
|
49
|
+
commands: [],
|
|
50
|
+
type: 'Light',
|
|
51
|
+
lazy: [],
|
|
52
|
+
active: [
|
|
53
|
+
{
|
|
54
|
+
object_id: 'p',
|
|
55
|
+
name: 'pressure',
|
|
56
|
+
type: 'Number'
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
object_id: 'e',
|
|
60
|
+
name: 'consumption',
|
|
61
|
+
type: 'Number'
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
object_id: 'a',
|
|
65
|
+
name: 'alive',
|
|
66
|
+
type: 'Property'
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
object_id: 'u',
|
|
70
|
+
name: 'updated',
|
|
71
|
+
type: 'Boolean'
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
object_id: 'm',
|
|
75
|
+
name: 'manufacturer',
|
|
76
|
+
type: 'Object'
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
object_id: 'r',
|
|
80
|
+
name: 'revisions',
|
|
81
|
+
type: 'Array'
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
object_id: 'd',
|
|
85
|
+
name: 'date',
|
|
86
|
+
type: 'Date'
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
object_id: 't',
|
|
90
|
+
name: 'time',
|
|
91
|
+
type: 'Time'
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
object_id: 'dt',
|
|
95
|
+
name: 'datetime',
|
|
96
|
+
type: 'DateTime'
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
service: 'smartgondor',
|
|
102
|
+
subservice: 'gardens',
|
|
103
|
+
providerUrl: 'http://smartgondor.com',
|
|
104
|
+
deviceRegistrationDuration: 'P1M'
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
describe('NGSI-LD: Value Type', function () {
|
|
108
|
+
// Case: Expression which results is sent as a new attribute
|
|
109
|
+
const values = [
|
|
110
|
+
{
|
|
111
|
+
name: 'e',
|
|
112
|
+
type: 'Number',
|
|
113
|
+
value: 1
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'a',
|
|
117
|
+
type: 'Property',
|
|
118
|
+
value: 'foo'
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'u',
|
|
122
|
+
type: 'Boolean',
|
|
123
|
+
value: false
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'm',
|
|
127
|
+
type: 'Object',
|
|
128
|
+
value: '{"hello": "world"}'
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: 'r',
|
|
132
|
+
type: 'Array',
|
|
133
|
+
value: '[1,2]'
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'd',
|
|
137
|
+
type: 'Date',
|
|
138
|
+
value: '2025-07-18'
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: 't',
|
|
142
|
+
type: 'Time',
|
|
143
|
+
value: '14:22:11Z'
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: 'dt',
|
|
147
|
+
type: 'Datetime',
|
|
148
|
+
value: '2025-07-18T14:22:11Z'
|
|
149
|
+
}
|
|
150
|
+
];
|
|
151
|
+
|
|
152
|
+
describe('When valueType is set to valueType', function () {
|
|
153
|
+
beforeEach(function (done) {
|
|
154
|
+
nock.cleanAll();
|
|
155
|
+
|
|
156
|
+
iotAgentConfig.contextBroker.valueType = 'valueType';
|
|
157
|
+
iotAgentLib.activate(iotAgentConfig, function () {
|
|
158
|
+
iotAgentLib.clearAll(function () {
|
|
159
|
+
done();
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
contextBrokerMock = nock('http://192.168.1.1:1026')
|
|
164
|
+
.matchHeader('fiware-service', 'smartgondor')
|
|
165
|
+
.matchHeader('fiware-servicepath', 'gardens')
|
|
166
|
+
.post(
|
|
167
|
+
'/ngsi-ld/v1/entityOperations/upsert/?options=update',
|
|
168
|
+
utils.readExampleFile('./test/unit/ngsi-ld/examples/contextRequests/updateContextValueType1.json')
|
|
169
|
+
)
|
|
170
|
+
.reply(204);
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
afterEach(function (done) {
|
|
174
|
+
iotAgentLib.clearAll(function () {
|
|
175
|
+
iotAgentLib.deactivate(done);
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
it('should add valueType to the payload', function (done) {
|
|
180
|
+
iotAgentLib.update('ws1', 'Light', '', values, function (error) {
|
|
181
|
+
should.not.exist(error);
|
|
182
|
+
contextBrokerMock.done();
|
|
183
|
+
done();
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
describe('When valueType is set to @type', function () {
|
|
188
|
+
beforeEach(function (done) {
|
|
189
|
+
iotAgentConfig.server.ldSupport.dataType = '@type';
|
|
190
|
+
iotAgentLib.activate(iotAgentConfig, function () {
|
|
191
|
+
iotAgentLib.clearAll(function () {
|
|
192
|
+
done();
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
nock.cleanAll();
|
|
196
|
+
|
|
197
|
+
contextBrokerMock = nock('http://192.168.1.1:1026')
|
|
198
|
+
.matchHeader('fiware-service', 'smartgondor')
|
|
199
|
+
.matchHeader('fiware-servicepath', 'gardens')
|
|
200
|
+
.post(
|
|
201
|
+
'/ngsi-ld/v1/entityOperations/upsert/?options=update',
|
|
202
|
+
utils.readExampleFile('./test/unit/ngsi-ld/examples/contextRequests/updateContextValueType2.json')
|
|
203
|
+
)
|
|
204
|
+
.reply(204);
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
afterEach(function (done) {
|
|
208
|
+
iotAgentLib.clearAll(function () {
|
|
209
|
+
iotAgentLib.deactivate(done);
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
it('should add @type to the payload', function (done) {
|
|
214
|
+
iotAgentLib.update('ws1', 'Light', '', values, function (error) {
|
|
215
|
+
should.not.exist(error);
|
|
216
|
+
contextBrokerMock.done();
|
|
217
|
+
done();
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"@context": "http://context.json-ld",
|
|
4
|
-
"configuration": {
|
|
5
|
-
"type": "Property",
|
|
6
|
-
"value": {
|
|
7
|
-
"@type": "Object",
|
|
8
|
-
"@value": {
|
|
9
|
-
"firmware": {
|
|
10
|
-
"hash": "cf23df2207d99a74fbe169e3eba035e633b65d94",
|
|
11
|
-
"version": "1.1.0"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"id": "urn:ngsi-ld:Light:light1",
|
|
17
|
-
"type": "Light"
|
|
18
|
-
}
|
|
19
|
-
]
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2022 Telefonica Investigación y Desarrollo, S.A.U
|
|
3
|
-
*
|
|
4
|
-
* This file is part of fiware-iotagent-lib
|
|
5
|
-
*
|
|
6
|
-
* fiware-iotagent-lib is free software: you can redistribute it and/or
|
|
7
|
-
* modify it under the terms of the GNU Affero General Public License as
|
|
8
|
-
* published by the Free Software Foundation, either version 3 of the License,
|
|
9
|
-
* or (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* fiware-iotagent-lib is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
14
|
-
* See the GNU Affero General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU Affero General Public
|
|
17
|
-
* License along with fiware-iotagent-lib.
|
|
18
|
-
* If not, see http://www.gnu.org/licenses/.
|
|
19
|
-
*
|
|
20
|
-
* For those usages not covered by the GNU Affero General Public License
|
|
21
|
-
* please contact with::[contacto@tid.es]
|
|
22
|
-
*
|
|
23
|
-
* Modified by: Daniel Calvo - ATOS Research & Innovation
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/* eslint-disable no-unused-vars */
|
|
27
|
-
|
|
28
|
-
const iotAgentLib = require('../../../../lib/fiware-iotagent-lib');
|
|
29
|
-
const utils = require('../../../tools/utils');
|
|
30
|
-
const request = utils.request;
|
|
31
|
-
const should = require('should');
|
|
32
|
-
const logger = require('logops');
|
|
33
|
-
const nock = require('nock');
|
|
34
|
-
let contextBrokerMock;
|
|
35
|
-
const iotAgentConfig = {
|
|
36
|
-
contextBroker: {
|
|
37
|
-
host: '192.168.1.1',
|
|
38
|
-
port: '1026',
|
|
39
|
-
ngsiVersion: 'ld',
|
|
40
|
-
jsonLdContext: 'http://context.json-ld'
|
|
41
|
-
},
|
|
42
|
-
server: {
|
|
43
|
-
port: 4041,
|
|
44
|
-
host: 'localhost'
|
|
45
|
-
},
|
|
46
|
-
types: {
|
|
47
|
-
Light: {
|
|
48
|
-
commands: [],
|
|
49
|
-
type: 'Light',
|
|
50
|
-
active: [
|
|
51
|
-
{
|
|
52
|
-
name: 'name',
|
|
53
|
-
type: 'LanguageProperty'
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
service: 'smartgondor',
|
|
59
|
-
subservice: 'gardens',
|
|
60
|
-
providerUrl: 'http://smartgondor.com'
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
describe('NGSI-LD - LanguageProperty test', function () {
|
|
64
|
-
beforeEach(function () {
|
|
65
|
-
logger.setLevel('FATAL');
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
afterEach(function (done) {
|
|
69
|
-
iotAgentLib.deactivate(done);
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
describe('When the IoT Agent receives new exonym from a device name with LanguageProperty type and a JSON object', function () {
|
|
73
|
-
const values = [
|
|
74
|
-
{
|
|
75
|
-
name: 'name',
|
|
76
|
-
type: 'LanguageProperty',
|
|
77
|
-
value: {
|
|
78
|
-
el: 'Κωνσταντινούπολις',
|
|
79
|
-
en: 'Constantinople',
|
|
80
|
-
tr: 'İstanbul'
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
];
|
|
84
|
-
|
|
85
|
-
beforeEach(function (done) {
|
|
86
|
-
nock.cleanAll();
|
|
87
|
-
|
|
88
|
-
contextBrokerMock = nock('http://192.168.1.1:1026')
|
|
89
|
-
.matchHeader('fiware-service', 'smartgondor')
|
|
90
|
-
.post(
|
|
91
|
-
'/ngsi-ld/v1/entityOperations/upsert/?options=update',
|
|
92
|
-
utils.readExampleFile(
|
|
93
|
-
'./test/unit/ngsi-ld/examples/contextRequests/updateContextLanguageProperties1.json'
|
|
94
|
-
)
|
|
95
|
-
)
|
|
96
|
-
.reply(204);
|
|
97
|
-
|
|
98
|
-
iotAgentLib.activate(iotAgentConfig, done);
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
it('should change the value of the corresponding attribute in the context broker', function (done) {
|
|
102
|
-
iotAgentLib.update('light1', 'Light', '', values, function (error) {
|
|
103
|
-
should.not.exist(error);
|
|
104
|
-
contextBrokerMock.done();
|
|
105
|
-
done();
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
});
|