Skip to content

Commit

Permalink
Merge pull request #484 from opengeospatial/part2-pubsub-ats
Browse files Browse the repository at this point in the history
add first pass ATS for Part 2
  • Loading branch information
chris-little authored Nov 29, 2023
2 parents baada5d + 17ef4e3 commit 7b7bd1e
Show file tree
Hide file tree
Showing 25 changed files with 324 additions and 132 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ candidate-standard/openapi/view_api.html
19-086.html
19-086.pdf
._19-086.pdf
*.abort
*.lck
*.xml_tmp
document.doc
document.err
document.err.html
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$schema: 'https://json-schema.org/draft/2020-12/schema'
$id: 'https://raw.githubusercontent.com/wmo-im/wcmp2/main/schema/wcmpRecordGeoJSON.yaml'
$id: 'https://raw.githubusercontent.com/opengeospatial/ogcapi-environmental-data-retrieval/master/extensions/pubsub/openapi/schemas/pubsub-message-payload-schema.yaml'
title: OGC API - Pub/Sub message payload definition
description: OGC API - Pub/Sub message payload definition

Expand Down
16 changes: 0 additions & 16 deletions extensions/pubsub/standard/abstract_tests/ATS_class_example1.adoc

This file was deleted.

11 changes: 11 additions & 0 deletions extensions/pubsub/standard/abstract_tests/ATS_class_pubsub.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[[ats_pubsub]]
====
[%metadata]
label:: http://www.opengis.net/spec/ogcapi-environmental-data-retrieval-2/1.0/pubsub
subject:: Requirements Class "pubsub"
classification:: Target Type:Pub/Sub
====

==== API

include::./pubsub/ATS_test_api.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[[ats_pubsub-message-channels]]
====
[%metadata]
label:: http://www.opengis.net/spec/ogcapi-environmental-data-retrieval-2/1.0/pubsub-message-channels
subject:: Requirements Class "pubsub-message-channels"
classification:: Target Type:Pub/Sub
====

==== Channels

include::./pubsub-channels/ATS_test_channels.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[[ats_pubsub-message-payload]]
====
[%metadata]
label:: http://www.opengis.net/spec/ogcapi-environmental-data-retrieval-2/1.0/pubsub-message-payload
subject:: Requirements Class "pubsub-message-payload"
classification:: Target Type:Pub/Sub
====

==== GeoJSON

include::./ATS_test_geojson.adoc[]

==== `+id+`

include::./pubsub-message-payload/ATS_test_id.adoc[]

==== `+properties.operation+`

include::./pubsub-message-payload/ATS_test_id.adoc[]

==== `+properties.pubtime+`

include::./pubsub-message-payload/ATS_test_pubtime.adoc[]
26 changes: 0 additions & 26 deletions extensions/pubsub/standard/abstract_tests/ATS_test_example1.adoc

This file was deleted.

21 changes: 0 additions & 21 deletions extensions/pubsub/standard/abstract_tests/ATS_test_example2.adoc

This file was deleted.

5 changes: 0 additions & 5 deletions extensions/pubsub/standard/abstract_tests/README.adoc

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[[ats_pubsub-channels_channels]]
[abstract_test]
====
[%metadata]
label:: /conf/pubsub-channels/channels
subject:: /conf/pubsub-channels/channels
test-purpose:: Validate that an EDR service provides AsyncAPI capabilities.
[.component,class=test method]
=====
[.component,class=step]
--
Construct a path for the API landing page
--

[.component,class=step]
--
Issue a HTTP GET request on that path
--

[.component,class=step]
--
Inspect all `+link+` objects in the response
--

[.component,class=step]
--
Ensure that at least one exists with `+rel=service-desc+` that corresponds to an AsyncAPI 2.0 description
--

=====
====
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[[ats_pubsub-message-payload_geojson]]
[abstract_test]
====
[%metadata]
label:: /conf/pubsub-message-payload/geojson
subject:: /conf/pubsub-message-payload/geojson
test-purpose:: Validate that a notification message is a valid GeoJSON document.
[.component,class=test method]
=====
[.component,class=step]
--
Construct a path for the API landing page
--

[.component,class=step]
--
Issue a HTTP GET request on that path
--

[.component,class=step]
--
Inspect all `+link+` objects in the response
--

[.component,class=step]
--
Find a link that contains `+rel=service-desc+` that corresponds to an AsyncAPI 2.0 description
--

[.component,class=step]
--
Using the server endpoint, subscribe to a given topic.
--

[.component,class=step]
--
Upon receiving a message against the selected topic, validate that the message is GeoJSON compliant.
--

=====
====
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[[ats_pubsub-message-payload_id]]
[abstract_test]
====
[%metadata]
label:: /conf/pubsub-message-payload/id
subject:: /conf/pubsub-message-payload/id
test-purpose:: Validate that a notification message provides an `id` property that is a GUID.
[.component,class=test method]
=====
[.component,class=step]
--
Construct a path for the API landing page
--

[.component,class=step]
--
Issue a HTTP GET request on that path
--

[.component,class=step]
--
Inspect all `+link+` objects in the response
--

[.component,class=step]
--
Find a link that contains `+rel=service-desc+` that corresponds to an AsyncAPI 2.0 description
--

[.component,class=step]
--
Using the server endpoint, subscribe to a given topic.
--

[.component,class=step]
--
Upon receiving a message against the selected topic, ensure that the message has an `id` property.
--

[.component,class=step]
--
Ensure that the `id` property is a valid GUID.
--

=====
====
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[[ats_pubsub-message-operation]]
[abstract_test]
====
[%metadata]
label:: /conf/pubsub-message-payload/operation
subject:: /conf/pubsub-message-payload/operation
test-purpose:: Validate that a notification message provides a `properties.operation` property.
[.component,class=test method]
=====
[.component,class=step]
--
Construct a path for the API landing page
--

[.component,class=step]
--
Issue a HTTP GET request on that path
--

[.component,class=step]
--
Inspect all `+link+` objects in the response
--

[.component,class=step]
--
Find a link that contains `+rel=service-desc+` that corresponds to an AsyncAPI 2.0 description
--

[.component,class=step]
--
Using the server endpoint, subscribe to a given topic.
--

[.component,class=step]
--
Upon receiving a message against the selected topic, ensure that the message has a `properties.operation` property whose value is one of `insert`, `update`, `delete`..
--

=====
====
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[[ats_pubsub-message-pubtime]]
[abstract_test]
====
[%metadata]
label:: /conf/pubsub-message-payload/pubtime
subject:: /conf/pubsub-message-payload/pubtime
test-purpose:: Validate that a notification message provides a `properties.pubtime` property.
[.component,class=test method]
=====
[.component,class=step]
--
Construct a path for the API landing page
--

[.component,class=step]
--
Issue a HTTP GET request on that path
--

[.component,class=step]
--
Inspect all `+link+` objects in the response
--

[.component,class=step]
--
Find a link that contains `+rel=service-desc+` that corresponds to an AsyncAPI 2.0 description
--

[.component,class=step]
--
Using the server endpoint, subscribe to a given topic.
--

[.component,class=step]
--
Upon receiving a message against the selected topic, ensure that the message has a `properties.pubtime` property whose value a valid RFC3339 datetime.
--

=====
====
32 changes: 32 additions & 0 deletions extensions/pubsub/standard/abstract_tests/pubsub/ATS_test_api.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[[ats_pubsub_api]]
[abstract_test]
====
[%metadata]
label:: /conf/pubsub/api
subject:: /conf/pubsub/api
test-purpose:: Validate that an EDR service provides AsyncAPI capabilities.
[.component,class=test method]
=====
[.component,class=step]
--
Construct a path for the API landing page
--

[.component,class=step]
--
Issue a HTTP GET request on that path
--

[.component,class=step]
--
Inspect all `+link+` objects in the response
--

[.component,class=step]
--
Ensure that at least one exists with `+rel=service-desc+` that corresponds to an AsyncAPI 2.0 description
--

=====
====
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[[per_pubsub-message-payload_operation]]

[permission,type="general",id="/per/pubsub-message-payload/operation", label="/per/pubsub-message-payload/operation"]
====
*A:*
An OGC API Pub/Sub Notification Message MAY provide the `+properties.operation+` property to indicate if a resource has been inserted.
====
Loading

0 comments on commit 7b7bd1e

Please sign in to comment.