Skip to content

Commit

Permalink
Merge pull request #665 from Keshav-NEC/Fix_for_664
Browse files Browse the repository at this point in the history
default attribute type changed to Text
  • Loading branch information
fgalan authored Feb 1, 2024
2 parents 5229908 + 3d87c5e commit 3dd03a5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@

- Fix: default attribute type changed from 'string' to 'Text' (#664)
2 changes: 1 addition & 1 deletion lib/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = {

HTTP_MEASURE_PATH: '/iot/d',

DEFAULT_ATTRIBUTE_TYPE: 'string',
DEFAULT_ATTRIBUTE_TYPE: 'Text',

COMMAND_STATUS_PENDING: 'PENDING',
COMMAND_STATUS_ERROR: 'ERROR',
Expand Down
2 changes: 1 addition & 1 deletion test/unit/ngsiv2/contextRequests/pollingMeasure.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id":"Second MQTT Device",
"type":"AnMQTTDevice",
"a": {
"type": "string",
"type": "Text",
"value": 23
}
}
2 changes: 1 addition & 1 deletion test/unit/ngsiv2/contextRequests/timeInstantMeasures.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"value": 24.4
},
"humidity": {
"type": "string",
"type": "Text",
"value": 32
},
"TimeInstant": {
Expand Down
14 changes: 7 additions & 7 deletions test/unit/ngsiv2/explicit_attributes-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ describe('explicitAttrs tests ', function () {
.post('/v2/entities?options=upsert', {
id: 'Sensor:Temperature:JSON_UNPROVISIONED',
type: 'Sensor:Temperature',
h: { type: 'string', value: 33 },
h: { type: 'Text', value: 33 },
temperature: { type: 'Number', value: 89 }
})
.reply(204);
Expand Down Expand Up @@ -414,7 +414,7 @@ describe('explicitAttrs tests ', function () {
.post('/v2/entities?options=upsert', {
id: 'Sensor:Temperature:JSON_UNPROVISIONED',
type: 'Sensor:Temperature',
h: { type: 'string', value: 33 },
h: { type: 'Text', value: 33 },
temperature: { type: 'Number', value: 89 }
})
.reply(204);
Expand Down Expand Up @@ -482,7 +482,7 @@ describe('explicitAttrs tests ', function () {
.post('/v2/entities?options=upsert', {
id: 'Sensor:Temperature:JSON_UNPROVISIONED',
type: 'Sensor:Temperature',
h: { type: 'string', value: 33 },
h: { type: 'Text', value: 33 },
temperature: { type: 'Number', value: 89 }
})
.reply(204);
Expand Down Expand Up @@ -620,7 +620,7 @@ describe('explicitAttrs tests ', function () {
.post('/v2/entities?options=upsert', {
id: 'Sensor:Temperature:JSON_UNPROVISIONED',
type: 'Sensor:Temperature',
h: { type: 'string', value: 33 },
h: { type: 'Text', value: 33 },
temperature: { type: 'Number', value: 89 }
})
.reply(204);
Expand Down Expand Up @@ -663,7 +663,7 @@ describe('explicitAttrs tests ', function () {
.post('/v2/entities?options=upsert', {
id: 'Sensor:Temperature:JSON_UNPROVISIONED',
type: 'Sensor:Temperature',
h: { type: 'string', value: 33 },
h: { type: 'Text', value: 33 },
temperature: { type: 'Number', value: 89 }
})
.reply(204);
Expand Down Expand Up @@ -731,7 +731,7 @@ describe('explicitAttrs tests ', function () {
.post('/v2/entities?options=upsert', {
id: 'Sensor:Temperature:JSON_UNPROVISIONED',
type: 'Sensor:Temperature',
h: { type: 'string', value: 33 },
h: { type: 'Text', value: 33 },
temperature: { type: 'Number', value: 89 }
})
.reply(204);
Expand Down Expand Up @@ -869,7 +869,7 @@ describe('explicitAttrs tests ', function () {
.post('/v2/entities?options=upsert', {
id: 'Sensor:Temperature:JSON_UNPROVISIONED',
type: 'Sensor:Temperature',
h: { type: 'string', value: 33 },
h: { type: 'Text', value: 33 },
temperature: { type: 'Number', value: 89 }
})
.reply(204);
Expand Down

0 comments on commit 3dd03a5

Please sign in to comment.