subscriptions_test_kit 0.9.1 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/inferno_requirements_tools/tasks/collect_requirements.rb +51 -50
- data/lib/inferno_requirements_tools/tasks/requirements_coverage.rb +22 -19
- data/lib/subscriptions_test_kit/common/notification_conformance_verification.rb +4 -2
- data/lib/subscriptions_test_kit/endpoints/subscription_create_endpoint.rb +7 -3
- data/lib/subscriptions_test_kit/endpoints/subscription_status_endpoint.rb +16 -11
- data/lib/subscriptions_test_kit/requirements/generated/subscriptions-test-kit_requirements_coverage.csv +50 -50
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/common/subscription_simulation_utils.rb +9 -6
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/conformance_verification/notification_input_payload_verification_test.rb +3 -3
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/conformance_verification/notification_input_verification_test.rb +2 -2
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/conformance_verification/processing_attestation_test.rb +2 -2
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/conformance_verification/subscription_verification_test.rb +3 -3
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/conformance_verification_group.rb +6 -6
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/interaction_test.rb +15 -12
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/interaction_verification/event_notification_verification_test.rb +7 -6
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/interaction_verification/handshake_notification_verification_test.rb +6 -6
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/interaction_verification_group.rb +4 -4
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow_group.rb +4 -4
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client_suite.rb +6 -4
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/{coverage/capability_statement → capability_statement}/cs_conformance_test.rb +2 -2
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/{coverage/capability_statement → capability_statement}/topic_discovery_test.rb +5 -5
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/capability_statement_group.rb +21 -0
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction/creation_response_conformance_test.rb +2 -2
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction/notification_delivery_test.rb +1 -1
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction/subscription_conformance_test.rb +11 -10
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction_group.rb +7 -7
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction_verification/notification_conformance_test.rb +1 -1
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction_verification_group.rb +2 -2
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/subscription_status_operation.rb +3 -2
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/{coverage/event_notification → event_notification}/empty_content/empty_conformance_test.rb +2 -2
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/{coverage/event_notification → event_notification}/empty_content_group.rb +11 -10
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/{coverage/event_notification → event_notification}/full_resource_content/full_resource_conformance_test.rb +4 -4
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/{coverage/event_notification → event_notification}/full_resource_content_group.rb +11 -10
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/{coverage/event_notification → event_notification}/id_only_content/id_only_conformance_test.rb +4 -4
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/{coverage/event_notification → event_notification}/id_only_content_group.rb +11 -10
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/{coverage/event_notification_group.rb → event_notification_group.rb} +6 -6
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/{coverage/handshake_heartbeat → handshake_heartbeat}/handshake_conformance_test.rb +9 -8
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/{coverage/handshake_heartbeat → handshake_heartbeat}/heartbeat_conformance_test.rb +6 -4
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/{coverage/handshake_heartbeat_group.rb → handshake_heartbeat_group.rb} +3 -3
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/{coverage/status_operation → status_operation}/status_invocation_test.rb +4 -4
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/{coverage/status_operation_group.rb → status_operation_group.rb} +3 -3
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/{coverage/subscription_rejection → subscription_rejection}/reject_subscriptions_test.rb +31 -27
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/{coverage/subscription_rejection_group.rb → subscription_rejection_group.rb} +2 -2
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/workflow_group.rb +3 -3
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server_suite.rb +14 -5
- data/lib/subscriptions_test_kit/version.rb +1 -3
- metadata +21 -92
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/capability_statement_group.rb +0 -21
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage_group.rb +0 -26
@@ -1,11 +1,11 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative '../../../../common/notification_conformance_verification'
|
2
2
|
|
3
3
|
module SubscriptionsTestKit
|
4
4
|
module SubscriptionsR5BackportR4Server
|
5
5
|
class IdOnlyConformanceTest < Inferno::Test
|
6
6
|
include NotificationConformanceVerification
|
7
7
|
|
8
|
-
id :
|
8
|
+
id :subscriptions_r4_server_id_only_conformance
|
9
9
|
title 'Subscription Id-Only Notification Verification'
|
10
10
|
description %(
|
11
11
|
This test takes the received notification bundle and ensures it is conformant to the
|
@@ -15,8 +15,8 @@ module SubscriptionsTestKit
|
|
15
15
|
With the content type of id-only, the resources involved in triggering the notification are only available
|
16
16
|
through other channels, but notifications include URLs which can be used to access those resources.
|
17
17
|
|
18
|
-
When the content type is id-only, notification bundles SHALL include references to the appropriate focus
|
19
|
-
in the SubscriptionStatus.notificationEvent.focus element.
|
18
|
+
When the content type is id-only, notification bundles SHALL include references to the appropriate focus
|
19
|
+
resources in the SubscriptionStatus.notificationEvent.focus element.
|
20
20
|
|
21
21
|
Additionally, notification bundles MAY contain, in addition to the SubscriptionStatus used to convey status
|
22
22
|
information, at least one Bundle.entry for each resource relevant to the notification.
|
@@ -1,11 +1,11 @@
|
|
1
|
-
require_relative '
|
2
|
-
require_relative '
|
1
|
+
require_relative '../common/interaction_group'
|
2
|
+
require_relative '../common/interaction_verification_group'
|
3
3
|
require_relative 'id_only_content/id_only_conformance_test'
|
4
4
|
|
5
5
|
module SubscriptionsTestKit
|
6
6
|
module SubscriptionsR5BackportR4Server
|
7
7
|
class IdOnlyContentGroup < Inferno::TestGroup
|
8
|
-
id :
|
8
|
+
id :subscriptions_r4_server_id_only_content
|
9
9
|
title 'Id Only Notification Verification'
|
10
10
|
description %(
|
11
11
|
Verify that the received Notifications are conformant to the
|
@@ -18,8 +18,8 @@ module SubscriptionsTestKit
|
|
18
18
|
|
19
19
|
input_order :url, :credentials, :access_token, :id_only_subscription_resource
|
20
20
|
|
21
|
-
group from: :
|
22
|
-
id :
|
21
|
+
group from: :subscriptions_r4_server_interaction do
|
22
|
+
id :subscriptions_r4_server_id_only_content_interaction
|
23
23
|
optional
|
24
24
|
|
25
25
|
config(
|
@@ -31,9 +31,10 @@ module SubscriptionsTestKit
|
|
31
31
|
type: 'textarea',
|
32
32
|
description: %(
|
33
33
|
A Subscription resource in JSON format that Inferno will send to the server under test
|
34
|
-
so that it can demonstrate its ability to send an id-only Notification.
|
34
|
+
so that it can demonstrate its ability to send an id-only Notification.
|
35
35
|
The instance must be conformant to the R4/B Topic-Based Subscription profile.
|
36
|
-
Inferno may modify the Subscription before submission, e.g., to point to Inferno's notification
|
36
|
+
Inferno may modify the Subscription before submission, e.g., to point to Inferno's notification
|
37
|
+
endpoint.
|
37
38
|
),
|
38
39
|
optional: true
|
39
40
|
},
|
@@ -44,14 +45,14 @@ module SubscriptionsTestKit
|
|
44
45
|
}
|
45
46
|
)
|
46
47
|
end
|
47
|
-
group from: :
|
48
|
-
id :
|
48
|
+
group from: :subscriptions_r4_server_interaction_verification do
|
49
|
+
id :subscriptions_r4_server_id_only_content_interaction_verification
|
49
50
|
optional
|
50
51
|
|
51
52
|
config(
|
52
53
|
options: { subscription_type: 'id-only' }
|
53
54
|
)
|
54
|
-
test from: :
|
55
|
+
test from: :subscriptions_r4_server_id_only_conformance
|
55
56
|
end
|
56
57
|
end
|
57
58
|
end
|
@@ -5,21 +5,21 @@ require_relative 'event_notification/id_only_content_group'
|
|
5
5
|
module SubscriptionsTestKit
|
6
6
|
module SubscriptionsR5BackportR4Server
|
7
7
|
class EventNotificationGroup < Inferno::TestGroup
|
8
|
-
id :
|
8
|
+
id :subscriptions_r4_server_event_notification
|
9
9
|
title 'Backport Subscription Notification Verification'
|
10
10
|
description %(
|
11
11
|
Verify that the received Notifications are conformant to the
|
12
12
|
[R4 Topic-Based Subscription Notification Bundle](https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription-notification-r4.html)
|
13
|
-
profile, including additional requirements around the content type. This group contains tests for the three
|
14
|
-
available when specifying the contents of a Notification: empty, id-only, and full-resource.
|
13
|
+
profile, including additional requirements around the content type. This group contains tests for the three
|
14
|
+
options available when specifying the contents of a Notification: empty, id-only, and full-resource.
|
15
15
|
)
|
16
16
|
|
17
17
|
input_order :url, :credentials, :access_token, :empty_subscription_resource,
|
18
18
|
:id_only_subscription_resource, :full_resource_subscription_resource
|
19
19
|
|
20
|
-
group from: :
|
21
|
-
group from: :
|
22
|
-
group from: :
|
20
|
+
group from: :subscriptions_r4_server_empty_content
|
21
|
+
group from: :subscriptions_r4_server_id_only_content
|
22
|
+
group from: :subscriptions_r4_server_full_resource_content
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
@@ -1,17 +1,17 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative '../../../common/notification_conformance_verification'
|
2
2
|
|
3
3
|
module SubscriptionsTestKit
|
4
4
|
module SubscriptionsR5BackportR4Server
|
5
5
|
class HandshakeConformanceTest < Inferno::Test
|
6
6
|
include NotificationConformanceVerification
|
7
7
|
|
8
|
-
id :
|
8
|
+
id :subscriptions_r4_server_handshake_conformance
|
9
9
|
title 'Subscription Handshake Verification'
|
10
10
|
description %(
|
11
11
|
When a Subscription is created for a REST Hook channel type, the server SHALL set initial status to requested,
|
12
|
-
pending verification of the nominated endpoint URL. The Server will then send a handshake bundle to the
|
13
|
-
After a successful handshake notification has been sent and accepted, the server SHALL update the
|
14
|
-
active. This test verifies that the incoming handshake request is a conformant
|
12
|
+
pending verification of the nominated endpoint URL. The Server will then send a handshake bundle to the
|
13
|
+
endpoint. After a successful handshake notification has been sent and accepted, the server SHALL update the
|
14
|
+
status to active. This test verifies that the incoming handshake request is a conformant
|
15
15
|
[R4 Topic-Based Subscription Notification Bundle](https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription-notification-r4.html).
|
16
16
|
)
|
17
17
|
|
@@ -41,9 +41,10 @@ module SubscriptionsTestKit
|
|
41
41
|
|
42
42
|
requests = load_tagged_requests('handshake')
|
43
43
|
if requests.empty?
|
44
|
-
omit_if subscription_request_ids.empty?,
|
44
|
+
omit_if subscription_request_ids.empty?,
|
45
|
+
'No handshake requests were required or received in a previous tests.'
|
45
46
|
assert(subscription_request_ids.empty?,
|
46
|
-
|
47
|
+
'Handshake requests are required if a Subscription channel type is `rest-hook`')
|
47
48
|
end
|
48
49
|
|
49
50
|
requests = requests.uniq(&:request_body)
|
@@ -60,7 +61,7 @@ module SubscriptionsTestKit
|
|
60
61
|
|
61
62
|
no_error_verification('Received handshakes are not conformant.')
|
62
63
|
assert(subscription_request_ids.empty?,
|
63
|
-
|
64
|
+
'Did not receive a handshake notification for some `rest-hook` subscriptions')
|
64
65
|
end
|
65
66
|
end
|
66
67
|
end
|
@@ -1,11 +1,11 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative '../../../common/notification_conformance_verification'
|
2
2
|
|
3
3
|
module SubscriptionsTestKit
|
4
4
|
module SubscriptionsR5BackportR4Server
|
5
5
|
class HeartbeatConformanceTest < Inferno::Test
|
6
6
|
include NotificationConformanceVerification
|
7
7
|
|
8
|
-
id :
|
8
|
+
id :subscriptions_r4_server_heartbeat_conformance
|
9
9
|
title 'Subscription Heartbeat Verification'
|
10
10
|
description %(
|
11
11
|
When a Subscription is created for a REST Hook channel type, the server Server may send notifications of type
|
@@ -26,7 +26,9 @@ module SubscriptionsTestKit
|
|
26
26
|
def heartbeat_period?(subscription_extensions)
|
27
27
|
return false if subscription_extensions.blank?
|
28
28
|
|
29
|
-
heartbeat = subscription_extensions.find
|
29
|
+
heartbeat = subscription_extensions.find do |extension|
|
30
|
+
extension['url'].ends_with?('/backport-heartbeat-period')
|
31
|
+
end
|
30
32
|
|
31
33
|
return false if heartbeat.blank?
|
32
34
|
|
@@ -63,7 +65,7 @@ module SubscriptionsTestKit
|
|
63
65
|
subscription_id = tags.first
|
64
66
|
|
65
67
|
assert(subscription_request_ids.include?(subscription_id),
|
66
|
-
|
68
|
+
'If `heartbeatPeriod` field is not present in the Subscription, heartbeat should not be sent.')
|
67
69
|
|
68
70
|
notification_verification(request.request_body, 'heartbeat', subscription_id:)
|
69
71
|
no_error_verification('Received heartbeats are not conformant.')
|
@@ -4,7 +4,7 @@ require_relative 'handshake_heartbeat/heartbeat_conformance_test'
|
|
4
4
|
module SubscriptionsTestKit
|
5
5
|
module SubscriptionsR5BackportR4Server
|
6
6
|
class HandshakeHeartbeatGroup < Inferno::TestGroup
|
7
|
-
id :
|
7
|
+
id :subscriptions_r4_server_handshake_heartbeat
|
8
8
|
title 'Backport Subscription Handshake and Heartbeat Notification Verification'
|
9
9
|
description %(
|
10
10
|
Verify that the any received Handshake or Heartbeat Notifications are conformant to the
|
@@ -12,8 +12,8 @@ module SubscriptionsTestKit
|
|
12
12
|
profile.
|
13
13
|
)
|
14
14
|
|
15
|
-
test from: :
|
16
|
-
test from: :
|
15
|
+
test from: :subscriptions_r4_server_handshake_conformance
|
16
|
+
test from: :subscriptions_r4_server_heartbeat_conformance
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -1,11 +1,11 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative '../common/subscription_status_operation'
|
2
2
|
|
3
3
|
module SubscriptionsTestKit
|
4
4
|
module SubscriptionsR5BackportR4Server
|
5
5
|
class StatusInvocationTest < Inferno::Test
|
6
6
|
include SubscriptionStatusOperation
|
7
7
|
|
8
|
-
id :
|
8
|
+
id :subscriptions_r4_server_status_invocation
|
9
9
|
title 'Server supports subscription $status operation'
|
10
10
|
description %(
|
11
11
|
In order to claim conformance with this guide, a server: SHALL support the [$status operation](https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/OperationDefinition-backport-subscription-status.html)
|
@@ -14,8 +14,8 @@ module SubscriptionsTestKit
|
|
14
14
|
resources, one per Subscription being queried. The Bundle type is "searchset". The status of the Subscription
|
15
15
|
should be set to 'active' after a successful handshake with the rest-hook endpoint.
|
16
16
|
|
17
|
-
This test ensures the server supports the $status operation by performing the operation and ensuring it receives
|
18
|
-
valid response.
|
17
|
+
This test ensures the server supports the $status operation by performing the operation and ensuring it receives
|
18
|
+
a valid response.
|
19
19
|
)
|
20
20
|
|
21
21
|
verifies_requirements 'hl7.fhir.uv.subscriptions_1.1.0@20',
|
@@ -3,13 +3,13 @@ require_relative 'status_operation/status_invocation_test'
|
|
3
3
|
module SubscriptionsTestKit
|
4
4
|
module SubscriptionsR5BackportR4Server
|
5
5
|
class StatusOperationGroup < Inferno::TestGroup
|
6
|
-
id :
|
6
|
+
id :subscriptions_r4_server_status_operation
|
7
7
|
title 'Subscription $status Operation Verification'
|
8
8
|
description %(
|
9
9
|
This test group verifies that the Backport Subscriptions Server supports the $status operation.
|
10
10
|
)
|
11
|
-
|
12
|
-
test from: :
|
11
|
+
|
12
|
+
test from: :subscriptions_r4_server_status_invocation
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -1,17 +1,17 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative '../common/subscription_creation'
|
2
2
|
|
3
3
|
module SubscriptionsTestKit
|
4
4
|
module SubscriptionsR5BackportR4Server
|
5
5
|
class RejectSubscriptionsTest < Inferno::Test
|
6
6
|
include SubscriptionCreation
|
7
7
|
|
8
|
-
id :
|
8
|
+
id :subscriptions_r4_server_reject_subscriptions
|
9
9
|
title 'Server Handles Unsupported Subscriptions'
|
10
10
|
description %(
|
11
|
-
When processing a request for a Subscription a server SHOULD verify that the Subscription is supported and does
|
12
|
-
contain any information not implemented by the server. If the Subscription is
|
13
|
-
the Subscription create request, or it should attempt to adjust the Subscription. This test checks
|
14
|
-
correctly rejects or adjusts the Subscription in the following cases:
|
11
|
+
When processing a request for a Subscription a server SHOULD verify that the Subscription is supported and does
|
12
|
+
not contain any information not implemented by the server. If the Subscription is not supported, the server
|
13
|
+
should reject the Subscription create request, or it should attempt to adjust the Subscription. This test checks
|
14
|
+
that the server correctly rejects or adjusts the Subscription in the following cases:
|
15
15
|
|
16
16
|
- The Subscription contains cross-version extension
|
17
17
|
- The Subscription contains a Subscription Topic not implemented by the server
|
@@ -21,7 +21,7 @@ module SubscriptionsTestKit
|
|
21
21
|
- The Subscription contains a payload type not implemented by the server
|
22
22
|
- The Subscription contains an unsupported channel and payload type combination
|
23
23
|
|
24
|
-
The test will pass if the server either
|
24
|
+
The test will pass if the server either
|
25
25
|
1. rejects the Subscription by responding with a non-201 response, or
|
26
26
|
2. updates the Subscription resource to remove or replace the unsupported value.
|
27
27
|
)
|
@@ -41,20 +41,23 @@ module SubscriptionsTestKit
|
|
41
41
|
so that it can demonstrate its ability to perform the Subscription creation and Notification
|
42
42
|
response workflow. The instance must be conformant to the R4/B Topic-Based Subscription profile.
|
43
43
|
Inferno may modify the Subscription before submission, e.g., to point to Inferno's notification endpoint.
|
44
|
-
This input is also used by the unsupported Subscription test as the base on which to add unsupported
|
45
|
-
values to test for server rejection.
|
44
|
+
This input is also used by the unsupported Subscription test as the base on which to add unsupported
|
45
|
+
element values to test for server rejection.
|
46
46
|
)
|
47
47
|
input :unsupported_subscription_topic,
|
48
48
|
title: 'Unsupported Subscription Topic',
|
49
|
-
description:
|
49
|
+
description: %(A Subscription Topic for the `criteria` element that is not implemented by the server to test
|
50
|
+
for Subscription rejection.),
|
50
51
|
optional: true
|
51
52
|
input :unsupported_subscription_filter,
|
52
53
|
title: 'Unsupported Subscription Filter',
|
53
|
-
description:
|
54
|
+
description: %(A value for `filterCriteria` extension under the `criteria` that is not implemented by the
|
55
|
+
server to test for Subscription rejection.),
|
54
56
|
optional: true
|
55
57
|
input :unsupported_subscription_channel_type,
|
56
58
|
title: 'Unsupported Subscription Channel Type',
|
57
|
-
description:
|
59
|
+
description: %(A value for the `channel.type` element that is not implemented by the server to test for
|
60
|
+
Subscription rejection.),
|
58
61
|
optional: true
|
59
62
|
input :unsupported_subscription_channel_endpoint,
|
60
63
|
title: 'Unsupported Subscription Channel Endpoint',
|
@@ -62,12 +65,13 @@ module SubscriptionsTestKit
|
|
62
65
|
optional: true
|
63
66
|
input :unsupported_subscription_payload_type,
|
64
67
|
title: 'Unsupported Subscription Payload Type',
|
65
|
-
description:
|
68
|
+
description: %(A value for the `content` extension under the `channel.payload` element that is not
|
69
|
+
implemented by the server to test for Subscription rejection.),
|
66
70
|
optional: true
|
67
71
|
input :unsupported_subscription_channel_payload_combo,
|
68
72
|
title: 'Unsupported Subscription Channel and Payload Combination',
|
69
73
|
description: %(
|
70
|
-
A channel (`channel.type`) and payload type (`content` extension under the `channel.payload` element)
|
74
|
+
A channel (`channel.type`) and payload type (`content` extension under the `channel.payload` element)
|
71
75
|
combination not implemented by the server to test for Subscription
|
72
76
|
rejection. Provide in the json format e.g. {channel: <'channel_type'>, payload: <'payload_type'>}.
|
73
77
|
),
|
@@ -92,13 +96,13 @@ module SubscriptionsTestKit
|
|
92
96
|
'unsupported_title' => 'unsupported filter criteria',
|
93
97
|
'field_path' => ['_criteria'],
|
94
98
|
'field_value' => if unsupported_subscription_filter.nil?
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
99
|
+
unsupported_subscription_filter
|
100
|
+
else
|
101
|
+
{ 'extension' => [{
|
102
|
+
url: 'http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-filter-criteria',
|
103
|
+
valueString: unsupported_subscription_filter
|
104
|
+
}] }
|
105
|
+
end
|
102
106
|
},
|
103
107
|
{
|
104
108
|
'unsupported_title' => 'unsupported channel type',
|
@@ -142,8 +146,8 @@ module SubscriptionsTestKit
|
|
142
146
|
original_field_value = subscription_field[field_name]
|
143
147
|
subscription_field[field_name] = unsupported_info['field_value']
|
144
148
|
|
145
|
-
send_unsupported_subscription(subscription, unsupported_info['unsupported_title'],
|
146
|
-
|
149
|
+
send_unsupported_subscription(subscription, unsupported_info['unsupported_title'],
|
150
|
+
[unsupported_info['field_path']], [unsupported_info['field_value']])
|
147
151
|
|
148
152
|
if original_field_value.nil?
|
149
153
|
subscription_field.delete(field_name)
|
@@ -159,8 +163,8 @@ module SubscriptionsTestKit
|
|
159
163
|
payload_value = channel_payload_combo['payload']
|
160
164
|
|
161
165
|
if channel_value.blank? || payload_value.blank?
|
162
|
-
add_message('error', %(
|
163
|
-
|
166
|
+
add_message('error', %(Channel and payload values are not populated correctly in unsupported channel and
|
167
|
+
payload combination input.))
|
164
168
|
else
|
165
169
|
subscription_channel = subscription['channel']
|
166
170
|
subscription_channel['type'] = channel_value
|
@@ -169,8 +173,8 @@ module SubscriptionsTestKit
|
|
169
173
|
channel_path = ['channel', 'type']
|
170
174
|
payload_path = ['channel', 'payload']
|
171
175
|
|
172
|
-
send_unsupported_subscription(subscription, 'unsupported channel and payload combination',
|
173
|
-
|
176
|
+
send_unsupported_subscription(subscription, 'unsupported channel and payload combination',
|
177
|
+
[channel_path, payload_path], [channel_value, payload_value])
|
174
178
|
end
|
175
179
|
end
|
176
180
|
|
@@ -3,7 +3,7 @@ require_relative 'subscription_rejection/reject_subscriptions_test'
|
|
3
3
|
module SubscriptionsTestKit
|
4
4
|
module SubscriptionsR5BackportR4Server
|
5
5
|
class SubscriptionRejectionGroup < Inferno::TestGroup
|
6
|
-
id :
|
6
|
+
id :subscriptions_r4_server_subscription_rejection
|
7
7
|
title 'Subscription Creation Rejection Verification'
|
8
8
|
description %(
|
9
9
|
This test group verifies that the Backport Subscriptions Server supports rejecting unsupported
|
@@ -15,7 +15,7 @@ module SubscriptionsTestKit
|
|
15
15
|
:unsupported_subscription_channel_endpoint, :unsupported_subscription_payload_type,
|
16
16
|
:unsupported_subscription_channel_payload_combo
|
17
17
|
|
18
|
-
test from: :
|
18
|
+
test from: :subscriptions_r4_server_reject_subscriptions
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/workflow_group.rb
CHANGED
@@ -4,7 +4,7 @@ require_relative 'common/interaction_verification_group'
|
|
4
4
|
module SubscriptionsTestKit
|
5
5
|
module SubscriptionsR5BackportR4Server
|
6
6
|
class WorkflowGroup < Inferno::TestGroup
|
7
|
-
id :
|
7
|
+
id :subscriptions_r4_server_workflow
|
8
8
|
title 'Demonstrate the subscription workflow'
|
9
9
|
description %(
|
10
10
|
Demonstrate the ability of the server to accept a request for the
|
@@ -20,8 +20,8 @@ module SubscriptionsTestKit
|
|
20
20
|
|
21
21
|
input_order :url, :credentials, :access_token, :subscription_resource
|
22
22
|
|
23
|
-
group from: :
|
24
|
-
group from: :
|
23
|
+
group from: :subscriptions_r4_server_interaction
|
24
|
+
group from: :subscriptions_r4_server_interaction_verification
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
@@ -1,5 +1,9 @@
|
|
1
1
|
require_relative 'subscriptions_r5_backport_r4_server/workflow_group'
|
2
|
-
require_relative 'subscriptions_r5_backport_r4_server/
|
2
|
+
require_relative 'subscriptions_r5_backport_r4_server/capability_statement_group'
|
3
|
+
require_relative 'subscriptions_r5_backport_r4_server/event_notification_group'
|
4
|
+
require_relative 'subscriptions_r5_backport_r4_server/handshake_heartbeat_group'
|
5
|
+
require_relative 'subscriptions_r5_backport_r4_server/status_operation_group'
|
6
|
+
require_relative 'subscriptions_r5_backport_r4_server/subscription_rejection_group'
|
3
7
|
require_relative '../endpoints/subscription_rest_hook_endpoint'
|
4
8
|
require_relative '../urls'
|
5
9
|
require_relative '../version'
|
@@ -11,7 +15,8 @@ module SubscriptionsTestKit
|
|
11
15
|
title 'Subscriptions R5 Backport IG v1.1.0 FHIR R4 Server Test Suite'
|
12
16
|
short_title 'Subscriptions R4 Server'
|
13
17
|
version VERSION
|
14
|
-
description File.read(File.join(__dir__, '..', 'docs',
|
18
|
+
description File.read(File.join(__dir__, '..', 'docs',
|
19
|
+
'subscriptions_r5_backport_r4_server_suite_description.md'))
|
15
20
|
|
16
21
|
links [
|
17
22
|
{
|
@@ -31,7 +36,7 @@ module SubscriptionsTestKit
|
|
31
36
|
url: 'https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/'
|
32
37
|
}
|
33
38
|
]
|
34
|
-
|
39
|
+
|
35
40
|
# These inputs will be available to all tests in this suite
|
36
41
|
input :url,
|
37
42
|
title: 'FHIR Server Base URL',
|
@@ -72,8 +77,12 @@ module SubscriptionsTestKit
|
|
72
77
|
SubscriptionsR5BackportR4ServerSuite.extract_token_from_query_params(request)
|
73
78
|
end
|
74
79
|
|
75
|
-
group from: :
|
76
|
-
group from: :
|
80
|
+
group from: :subscriptions_r4_server_workflow
|
81
|
+
group from: :subscriptions_r4_server_capability_statement
|
82
|
+
group from: :subscriptions_r4_server_event_notification
|
83
|
+
group from: :subscriptions_r4_server_handshake_heartbeat
|
84
|
+
group from: :subscriptions_r4_server_status_operation
|
85
|
+
group from: :subscriptions_r4_server_subscription_rejection
|
77
86
|
end
|
78
87
|
end
|
79
88
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: subscriptions_test_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karl Naden, Emily Semple, Tom Strassner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inferno_core
|
@@ -16,84 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.5.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: roo
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 2.10.1
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 2.10.1
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: database_cleaner-sequel
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '1.8'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '1.8'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: factory_bot
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '6.1'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '6.1'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rspec
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '3.10'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '3.10'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: webmock
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '3.11'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '3.11'
|
26
|
+
version: 0.5.0
|
97
27
|
description: Inferno test kit for FHIR R5-style Subscriptions
|
98
28
|
email:
|
99
29
|
- inferno@groups.mitre.org
|
@@ -135,6 +65,9 @@ files:
|
|
135
65
|
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/interaction_verification_group.rb
|
136
66
|
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow_group.rb
|
137
67
|
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client_suite.rb
|
68
|
+
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/capability_statement/cs_conformance_test.rb
|
69
|
+
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/capability_statement/topic_discovery_test.rb
|
70
|
+
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/capability_statement_group.rb
|
138
71
|
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction/creation_response_conformance_test.rb
|
139
72
|
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction/notification_delivery_test.rb
|
140
73
|
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction/subscription_conformance_test.rb
|
@@ -143,24 +76,20 @@ files:
|
|
143
76
|
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction_verification_group.rb
|
144
77
|
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/subscription_creation.rb
|
145
78
|
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/subscription_status_operation.rb
|
146
|
-
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/
|
147
|
-
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/
|
148
|
-
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/
|
149
|
-
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/
|
150
|
-
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/
|
151
|
-
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/
|
152
|
-
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/
|
153
|
-
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/
|
154
|
-
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/
|
155
|
-
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/
|
156
|
-
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/
|
157
|
-
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/
|
158
|
-
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/
|
159
|
-
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/
|
160
|
-
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/status_operation_group.rb
|
161
|
-
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/subscription_rejection/reject_subscriptions_test.rb
|
162
|
-
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/subscription_rejection_group.rb
|
163
|
-
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage_group.rb
|
79
|
+
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/event_notification/empty_content/empty_conformance_test.rb
|
80
|
+
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/event_notification/empty_content_group.rb
|
81
|
+
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/event_notification/full_resource_content/full_resource_conformance_test.rb
|
82
|
+
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/event_notification/full_resource_content_group.rb
|
83
|
+
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/event_notification/id_only_content/id_only_conformance_test.rb
|
84
|
+
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/event_notification/id_only_content_group.rb
|
85
|
+
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/event_notification_group.rb
|
86
|
+
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/handshake_heartbeat/handshake_conformance_test.rb
|
87
|
+
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/handshake_heartbeat/heartbeat_conformance_test.rb
|
88
|
+
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/handshake_heartbeat_group.rb
|
89
|
+
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/status_operation/status_invocation_test.rb
|
90
|
+
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/status_operation_group.rb
|
91
|
+
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/subscription_rejection/reject_subscriptions_test.rb
|
92
|
+
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/subscription_rejection_group.rb
|
164
93
|
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/workflow_group.rb
|
165
94
|
- lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server_suite.rb
|
166
95
|
- lib/subscriptions_test_kit/tags.rb
|