Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,21 @@ class ProcessingAttestationTest < Inferno::Test
Subscription.
)

output :attest_true_url
output :attest_false_url

run do
load_tagged_requests(REST_HOOK_EVENT_NOTIFICATION_TAG)
skip_if(requests.none?, 'Inferno did not send an event notification')
token = SecureRandom.hex(32)

identifier = test_session_id
attest_true_url = "#{resume_pass_url_client}?test_run_identifier=#{identifier}"
output(attest_true_url:)
attest_false_url = "#{resume_fail_url_client}?test_run_identifier=#{identifier}"
output(attest_false_url:)

wait(
identifier: token,
identifier:,
message: %(
I attest that the client application successfully processed the event notification sent by Inferno.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ class InteractionTest < Inferno::Test
notification to send to the client endpoint, and responses to $status operation requests. The provided
Bundle must conform to the R4 Topic-Based Subscription Notification Bundle profile.
)
output :confirmation_url
output :fail_url

verifies_requirements 'hl7.fhir.uv.subscriptions_1.1.0@23'

Expand All @@ -80,6 +82,11 @@ class InteractionTest < Inferno::Test
m[:type] == 'error'
end, 'Notification Bundle input is invalid for use by Inferno, see error message(s)')

confirmation_url = "#{resume_pass_url_client}?test_run_identifier=#{access_token}"
output(confirmation_url:)
fail_url = "#{resume_fail_url_client}?test_run_identifier=#{access_token}"
output(fail_url:)

wait(
identifier: access_token,
timeout: 600,
Expand All @@ -101,10 +108,10 @@ class InteractionTest < Inferno::Test
At any point while this test is waiting, Inferno will respond to Subscription GET and $status requests.

Once the client has received an event notification and has made any additional requests,
[click here to complete the test](#{resume_pass_url_client}?test_run_identifier=#{access_token})
[click here to complete the test](#{confirmation_url})

If at any point something has gone wrong and the client is unable to continue,
[click here to fail the test](#{resume_fail_url_client}?test_run_identifier=#{access_token})
[click here to fail the test](#{fail_url})

NOTE: The test must be completed or failed using the links above within 10 minutes. After that,
attempts to send requests or to complete or fail the tests using the links above
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,16 @@ class NotificationDeliveryTest < Inferno::Test
provided as a `Bearer` token in the `Authorization` header of HTTP requests
sent to Inferno.
)
output :confirmation_url

run do
subscription = JSON.parse(updated_subscription)
returned_subscription = send_subscription(subscription)
subscription_payload_type = subscription_payload_type(subscription)

confirmation_url = "#{resume_pass_url_server}?token=notification%20#{access_token}"
output(confirmation_url:)

wait(
identifier: "notification #{access_token}",
message: %(
Expand All @@ -45,7 +50,7 @@ class NotificationDeliveryTest < Inferno::Test

`#{subscription_channel_url}`

[Click here](#{resume_pass_url_server}?token=notification%20#{access_token}) when you have finished
[Click here](#{confirmation_url}) when you have finished
submitting requests.

)
Expand Down