Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send multiple MQTT measures in a batch update to CB #857

Merged
merged 10 commits into from
Jan 29, 2025
Prev Previous commit
Next Next commit
add mocks values
AlvaroVega committed Jan 28, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit c9f9dfcc9dddbc3f47cd8381a29c4418e2553156
85 changes: 85 additions & 0 deletions test/unit/ngsiv2/contextRequests/multipleMeasuresJsonTypes4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"actionType": "append",
"entities": [
{
"id": "Second MQTT Device",
"type": "AnMQTTDevice",
"temperature": {
"type": "celsius",
"value": "87"
},
"humidity": {
"type": "degrees",
"value": "32"
},
"luminosity": {
"type": "Integer",
"value": 10
},
"pollution": {
"type": "Float",
"value": 43.4
},
"configuration": {
"type": "Object",
"value": {
"firmware": {
"version": "1.1.0",
"hash": "cf23df2207d99a74fbe169e3eba035e633b65d94"
}
}
},
"tags": {
"type": "Array",
"value": [
"iot",
"device"
]
},
"enabled": {
"type": "Boolean",
"value": true
}
},
{
"id": "Second MQTT Device",
"type": "AnMQTTDevice",
"temperature": {
"type": "celsius",
"value": "89"
},
"humidity": {
"type": "degrees",
"value": "33"
},
"luminosity": {
"type": "Integer",
"value": 10
},
"pollution": {
"type": "Float",
"value": 43.4
},
"configuration": {
"type": "Object",
"value": {
"firmware": {
"version": "1.1.0",
"hash": "cf23df2207d99a74fbe169e3eba035e633b65d94"
}
}
},
"tags": {
"type": "Array",
"value": [
"iot",
"device"
]
},
"enabled": {
"type": "Boolean",
"value": true
}
}
]
}
37 changes: 37 additions & 0 deletions test/unit/ngsiv2/contextRequests/timestampMeasure3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"actionType": "append",
"entities": [
{
"id": "Second MQTT Device",
"type": "AnMQTTDevice",
"temperature": {
"type": "celsius",
"value": "87"
},
"humidity": {
"type": "degrees",
"value": "32"
},
"TimeInstant": {
"type": "DateTime",
"value": "2007-11-03T13:18:05Z"
}
},
{
"id": "Second MQTT Device",
"type": "AnMQTTDevice",
"temperature": {
"type": "celsius",
"value": "89"
},
"humidity": {
"type": "degrees",
"value": "33"
},
"TimeInstant": {
"type": "DateTime",
"value": "2007-11-03T13:18:06Z"
}
}
]
}
29 changes: 29 additions & 0 deletions test/unit/ngsiv2/contextRequests/unknownMeasures3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"actionType": "append",
"entities": [
{
"id": "Second MQTT Device",
"type": "AnMQTTDevice",
"humidity": {
"type": "degrees",
"value": "32"
},
"weight": {
"type": "Text",
"value": "87"
}
},
{
"id": "Second MQTT Device",
"type": "AnMQTTDevice",
"humidity": {
"type": "degrees",
"value": "33"
},
"weight": {
"type": "Text",
"value": "89"
}
}
]
}
29 changes: 29 additions & 0 deletions test/unit/ngsiv2/contextRequests/unprovisionedDevice4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"actionType": "append",
"entities": [
{
"id": "TheLightType:JSON_UNPROVISIONED",
"type": "TheLightType",
"humidity": {
"type": "Text",
"value": "32"
},
"temperature": {
"type": "Text",
"value": "87"
}
},
{
"id": "TheLightType:JSON_UNPROVISIONED",
"type": "TheLightType",
"humidity": {
"type": "Text",
"value": "33"
},
"temperature": {
"type": "Text",
"value": "89"
}
}
]
}