Open bertt opened 7 years ago
cannot build the test (yet). https://github.com/opengeospatial/ets-sta10/pull/20#issuecomment-302037467
But expected result the test will fail because at the moment GOST needs a 'GOST' prefix in the topic when publishing (example topic GOST/Datastreams(1)/Observations) so need to fix that first.
one earlier suggestion is to build in SurgeMQ instead of using separate mosquitto server https://github.com/Geodan/gost/issues/67
Other option: Gossipd https://github.com/luanjunyi/gossipd
Description test 8: MQTT Subscribe on topic, HTTP POST/PUT/PATCH, MQTT should give message.
Sample:
applies to: THING, LOCATION, SENSOR, OBSERVED_PROPERTY, OBSERVATION,DATASTREAM, FEATURE_OF_INTEREST, HISTORICAL_LOCATION
1] checkSubscribeToEntitySetInsert
topic: v1.0/Things
curl: http post http://localhost:8080/v1.0/Things {"name":"Test Thing","description":"This is a Test Thing From TestNG"}
2] checkSubscribeToEntitySetUpdatePATCH topic: v1.0/Things curl: http patch http://localhost:8080/v1.0/Things(108) {"name":"This is a Updated Test Thing From TestNG","description":"This is a Updated Test Thing From TestNG"}
3] checkSubscribeToEntitySetUpdatePUT topic: v1.0/Things curl: http put http://localhost:8080/v1.0/Things(108) {"name":"This is a Updated Test Thing From TestNG","description":"This is a Updated Test Thing From TestNG"}
4] checkSubscribeToEntitySetUpdatePUT topic: v1.0/Things?$select=name curl: http post http://localhost:8080/v1.0/Things {"name":"Test Thing","description":"This is a Test Thing From TestNG"}
5] checkSubscribeToEntitySetWithMultipleSelectUpdatePATCH topic: v1.0/Things?$select=name curl: http patch http://localhost:8080/v1.0/Things(108) {"name":"This is a Updated Test Thing From TestNG","description":"This is a Updated Test Thing From TestNG"}
6] checkSubscribeToEntitySetWithRelativeTopicUpdatePUT topic: v1.0/Things?$select=name curl: http post http://localhost:8080/v1.0/Things {"name":"Test Thing","description":"This is a Test Thing From TestNG"}
7] checkSubscribeToEntitySetsWithDeepInsert
topic: v1.0/Things, v1.0/Locations, v1.0/Datastreams, v1.0/ObservedProperties, v1.0/Sensors
curl: http post http://localhost:8080/v1.0/Things
{
"name": "Office Building",
"description": "Office Building",
"properties": {
"reference": "Third Floor"
},
"Locations": [
{
"name": "West Roof",
"description": "West Roof",
"location": { "type": "Point", "coordinates": [-117.05, 51.05] },
"encodingType": "application/vnd.geo+json"
}
],
"Datastreams": [
{
"unitOfMeasurement": {
"name": "Lumen",
"symbol": "lm",
"definition": "http://www.qudt.org/qudt/owl/1.0.0/unit/Instances.html#Lumen"
},
"name": "Light exposure.",
"description": "Light exposure.",
"observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
"ObservedProperty": {
"name": "Luminous Flux",
"definition": "http://www.qudt.org/qudt/owl/1.0.0/quantity/Instances.html#LuminousFlux",
"description": "Luminous Flux or Luminous Power is the measure of the perceived power of light."
},
"Sensor": {
"name": "Acme Fluxomatic 1000",
"description": "Acme Fluxomatic 1000",
"encodingType": "application/pdf",
"metadata": "Light flux sensor"
}
}
]
}
8] checkSubscribeToEntityUpdatePATCH topic: v1.0/Things(118) curl: http patch http://localhost:8080/v1.0/Things(118) {"name":"This is a Updated Test Thing From TestNG","description":"This is a Updated Test Thing From TestNG"}
9] checkSubscribeToEntityUpdatePUT topic: v1.0/Things(118) curl: http put http://localhost:8080/v1.0/Things(118) {"name":"This is a Updated Test Thing From TestNG","description":"This is a Updated Test Thing From TestNG"}
10] checkSubscribeToEntityWithRelativeTopicUpdatePUT topics: v1.0/Datastreams(23)/Thing, v1.0/Datastreams(23)/Thing, v1.0/HistoricalLocations(24)/Thing curl: http put http://localhost:8080/v1.0/Things(120) {"name":"This is a Updated Test Thing From TestNG","description":"This is a Updated Test Thing From TestNG"}
11] checkSubscribeToPropertyUpdatePATCH topics: v1.0/Things(122)/name curl: http patch http://localhost:8080/v1.0/Things(121) {"name":"This is a Updated Test Thing From TestNG"}
12] checkSubscribeToPropertyUpdatePUT topic: v1.0/Things(123)/name curl: http put http://localhost:8080/v1.0/Things(121) {"name":"This is a Updated Test Thing From TestNG"}
Test if GOST complies to the SensorThings MQTT Tests https://github.com/opengeospatial/ets-sta10/pull/20