Skip to content

Commit

Permalink
default attribute type changed to Text
Browse files Browse the repository at this point in the history
KeshavSoni2511 committed Feb 1, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 5229908 commit 3d87c5e
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
@@ -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',
2 changes: 1 addition & 1 deletion test/unit/ngsiv2/contextRequests/pollingMeasure.json
Original file line number Diff line number Diff line change
@@ -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
@@ -6,7 +6,7 @@
"value": 24.4
},
"humidity": {
"type": "string",
"type": "Text",
"value": 32
},
"TimeInstant": {
14 changes: 7 additions & 7 deletions test/unit/ngsiv2/explicit_attributes-test.js
Original file line number Diff line number Diff line change
@@ -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);
@@ -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);
@@ -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);
@@ -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);
@@ -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);
@@ -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);
@@ -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);

0 comments on commit 3d87c5e

Please sign in to comment.