Skip to content

Commit

Permalink
conformance-tester: Add subscribe-event-destroy test
Browse files Browse the repository at this point in the history
  • Loading branch information
dennis-hamester committed Oct 21, 2023
1 parent ae4e1d0 commit 1d241e1
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
1 change: 1 addition & 0 deletions conformance-tester/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ pub static BUILT_IN_TESTS: Lazy<Vec<Test>> = Lazy::new(|| {
include_str!("../tests/send-item-with-unclaimed-receiver.json"),
include_str!("../tests/send-item-without-capacity.json"),
include_str!("../tests/send-item.json"),
include_str!("../tests/subscribe-event-destroy.json"),
include_str!("../tests/subscribe-event-invalid-service.json"),
include_str!("../tests/subscribe-event-ok.json"),
include_str!("../tests/subscribe-event-twice.json"),
Expand Down
72 changes: 72 additions & 0 deletions conformance-tester/tests/subscribe-event-destroy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"name": "subscribe-event-destroy",
"description": "Subscribe to an event and destroy the service",
"long-description": "A client subscribes to an event and destroys the service. The broker must send a service-destroyed-event message.",
"message-types": [
"destroy-service",
"service-destroyed-event",
"subscribe-event"
],
"steps": [
{
"type": "connect"
},
{
"type": "create-object",
"uuid": "00000000-0000-0000-0000-000000000001",
"cookie": "set:object"
},
{
"type": "create-service",
"object-cookie": "get:object",
"service-uuid": "00000000-0000-0000-0000-000000000002",
"service-cookie": "set:service",
"version": 0
},
{
"type": "send",
"message": "subscribe-event",
"serial": 0,
"service-cookie": "get:service",
"event": 1
},
{
"type": "receive-unordered",
"messages": [
{
"message": "subscribe-event",
"service-cookie": "get:service",
"event": 1
},
{
"message": "subscribe-event-reply",
"serial": 0,
"result": "ok"
}
]
},
{
"type": "send",
"message": "destroy-service",
"serial": 0,
"cookie": "get:service"
},
{
"type": "receive-unordered",
"messages": [
{
"message": "destroy-service-reply",
"serial": 0,
"result": "ok"
},
{
"message": "service-destroyed-event",
"object-uuid": "00000000-0000-0000-0000-000000000001",
"object-cookie": "get:object",
"service-uuid": "00000000-0000-0000-0000-000000000002",
"service-cookie": "get:service"
}
]
}
]
}

0 comments on commit 1d241e1

Please sign in to comment.