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

MQTT tests #94

Open
bertt opened this issue May 17, 2017 · 4 comments
Open

MQTT tests #94

bertt opened this issue May 17, 2017 · 4 comments

Comments

@bertt
Copy link
Contributor

bertt commented May 17, 2017

Test if GOST complies to the SensorThings MQTT Tests opengeospatial/ets-sta10#20

@bertt
Copy link
Contributor Author

bertt commented May 17, 2017

cannot build the test (yet). opengeospatial/ets-sta10#20 (comment)

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.

@bertt
Copy link
Contributor Author

bertt commented May 17, 2017

one earlier suggestion is to build in SurgeMQ instead of using separate mosquitto server #67

@bertt
Copy link
Contributor Author

bertt commented May 17, 2017

Other option: Gossipd https://github.com/luanjunyi/gossipd

@bertt
Copy link
Contributor Author

bertt commented May 30, 2017

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"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant