bulk_data_test_kit 0.11.1 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/config/presets/bulk_data_v101_bulk_data_server.json +10 -5
  3. data/config/presets/bulk_data_v101_inferno_reference_server.json +10 -5
  4. data/config/presets/bulk_data_v200_bulk_data_server.json +10 -5
  5. data/config/presets/bulk_data_v200_inferno_reference_server.json +10 -5
  6. data/lib/bulk_data_test_kit/bulk_export_validation_tester.rb +3 -3
  7. data/lib/bulk_data_test_kit/export_cancel_tests.rb +2 -2
  8. data/lib/bulk_data_test_kit/export_kick_off_performer.rb +3 -3
  9. data/lib/bulk_data_test_kit/export_operation_tests.rb +3 -3
  10. data/lib/bulk_data_test_kit/v1.0.1/bulk_data_export_cancel_test.rb +3 -1
  11. data/lib/bulk_data_test_kit/v1.0.1/bulk_data_export_kick_off_test.rb +3 -1
  12. data/lib/bulk_data_test_kit/v1.0.1/bulk_data_ndjson_download_test.rb +3 -1
  13. data/lib/bulk_data_test_kit/v1.0.1/bulk_data_no_auth_test.rb +4 -2
  14. data/lib/bulk_data_test_kit/v1.0.1/bulk_data_smart_backend_services_v101_group.rb +25 -3
  15. data/lib/bulk_data_test_kit/v1.0.1/bulk_data_status_check_test.rb +3 -1
  16. data/lib/bulk_data_test_kit/v1.0.1/bulk_data_test_suite.rb +1 -6
  17. data/lib/bulk_data_test_kit/v1.0.1/group/bulk_data_group_export_cancel_group.rb +3 -1
  18. data/lib/bulk_data_test_kit/v1.0.1/group/bulk_data_group_export_group.rb +5 -3
  19. data/lib/bulk_data_test_kit/v1.0.1/group/bulk_data_group_export_validation_group.rb +4 -1
  20. data/lib/bulk_data_test_kit/v1.0.1/patient/bulk_data_patient_export_cancel_group.rb +3 -1
  21. data/lib/bulk_data_test_kit/v1.0.1/patient/bulk_data_patient_export_group.rb +5 -3
  22. data/lib/bulk_data_test_kit/v1.0.1/patient/bulk_data_patient_export_validation_group.rb +4 -1
  23. data/lib/bulk_data_test_kit/v1.0.1/system_export/bulk_data_system_export_cancel_group.rb +3 -1
  24. data/lib/bulk_data_test_kit/v1.0.1/system_export/bulk_data_system_export_group.rb +5 -3
  25. data/lib/bulk_data_test_kit/v1.0.1/system_export/bulk_data_system_export_validation_group.rb +4 -1
  26. data/lib/bulk_data_test_kit/v2.0.0/bulk_data_export_cancel_test.rb +3 -1
  27. data/lib/bulk_data_test_kit/v2.0.0/bulk_data_outputFormat_param_test.rb +3 -1
  28. data/lib/bulk_data_test_kit/v2.0.0/bulk_data_since_param_test.rb +3 -1
  29. data/lib/bulk_data_test_kit/v2.0.0/bulk_data_smart_backend_services_v200_group.rb +25 -2
  30. data/lib/bulk_data_test_kit/v2.0.0/bulk_data_test_suite.rb +1 -0
  31. data/lib/bulk_data_test_kit/v2.0.0/group/bulk_data_group_export_parameters_group.rb +5 -3
  32. data/lib/bulk_data_test_kit/v2.0.0/patient/bulk_data_patient_export_parameters_group.rb +5 -3
  33. data/lib/bulk_data_test_kit/v2.0.0/system_export/bulk_data_system_export_parameters_group.rb +5 -3
  34. data/lib/bulk_data_test_kit/v2.0.0_client/bulk_data_client_delete_test.rb +0 -1
  35. data/lib/bulk_data_test_kit/v2.0.0_client/bulk_data_client_export_group.rb +5 -3
  36. data/lib/bulk_data_test_kit/v2.0.0_client/bulk_data_client_kick_off_test.rb +0 -1
  37. data/lib/bulk_data_test_kit/v2.0.0_client/bulk_data_client_output_test.rb +0 -1
  38. data/lib/bulk_data_test_kit/v2.0.0_client/bulk_data_client_status_test.rb +0 -1
  39. data/lib/bulk_data_test_kit/v2.0.0_client/bulk_data_client_test_suite.rb +24 -7
  40. data/lib/bulk_data_test_kit/v2.0.0_client/{bulk_data_client_export_wait_test.rb → bulk_data_client_wait_test.rb} +9 -10
  41. data/lib/bulk_data_test_kit/v2.0.0_client/docs/suite_description.md +8 -9
  42. data/lib/bulk_data_test_kit/v2.0.0_client/endpoints/delete.rb +6 -1
  43. data/lib/bulk_data_test_kit/v2.0.0_client/endpoints/kick_off.rb +39 -5
  44. data/lib/bulk_data_test_kit/v2.0.0_client/endpoints/output.rb +16 -9
  45. data/lib/bulk_data_test_kit/v2.0.0_client/endpoints/status.rb +33 -10
  46. data/lib/bulk_data_test_kit/v2.0.0_client/postman/{system_export.postman_collection.json → collection.json} +54 -8
  47. data/lib/bulk_data_test_kit/v2.0.0_client/server_proxy.rb +32 -0
  48. data/lib/bulk_data_test_kit/v2.0.0_client/urls.rb +6 -15
  49. data/lib/bulk_data_test_kit/version.rb +2 -2
  50. metadata +9 -11
  51. data/lib/bulk_data_test_kit/v2.0.0_client/bulk_data_client_delete_group.rb +0 -27
  52. data/lib/bulk_data_test_kit/v2.0.0_client/bulk_data_client_delete_wait_test.rb +0 -44
  53. data/lib/bulk_data_test_kit/v2.0.0_client/postman/delete.postman_collection.json +0 -133
@@ -2,7 +2,6 @@
2
2
 
3
3
  module BulkDataTestKit
4
4
  module BulkDataV200Client
5
- # Bulk Data Client Output
6
5
  class OutputTest < Inferno::Test
7
6
  title 'Bulk Data Output File Request'
8
7
 
@@ -2,7 +2,6 @@
2
2
 
3
3
  module BulkDataTestKit
4
4
  module BulkDataV200Client
5
- # Bulk Data Client Status
6
5
  class StatusTest < Inferno::Test
7
6
  title 'Bulk Data Status Request'
8
7
 
@@ -4,6 +4,7 @@ require_relative '../version'
4
4
  require_relative 'tags'
5
5
  require_relative 'urls'
6
6
  require_relative 'export_types'
7
+ require_relative 'server_proxy'
7
8
 
8
9
  require_relative 'endpoints/delete'
9
10
  require_relative 'endpoints/kick_off'
@@ -11,11 +12,9 @@ require_relative 'endpoints/output'
11
12
  require_relative 'endpoints/status'
12
13
 
13
14
  require_relative 'bulk_data_client_export_group'
14
- require_relative 'bulk_data_client_delete_group'
15
15
 
16
16
  module BulkDataTestKit
17
17
  module BulkDataV200Client
18
- # Bulk Data Access v2.0.0 Client Test Suite
19
18
  class BulkDataClientTestSuite < Inferno::TestSuite
20
19
  title 'Bulk Data Access v2.0.0 Client'
21
20
 
@@ -70,9 +69,28 @@ module BulkDataTestKit
70
69
 
71
70
  input :group_id,
72
71
  title: 'Group ID',
73
- description: 'If using the Group endpoint, the identifier of the Group to export.',
74
- default: 1,
75
- locked: true
72
+ description: 'If using the Group endpoint, the ID that represents the data set that will be used.',
73
+ type: 'radio',
74
+ options: {
75
+ list_options: [
76
+ {
77
+ label: 'PDex Data',
78
+ value: 'pdex-Group'
79
+ },
80
+ {
81
+ label: 'CARIN Data',
82
+ value: 'carin-Group'
83
+ },
84
+ {
85
+ label: 'US Core Data',
86
+ value: '1a'
87
+ },
88
+ {
89
+ label: 'PDex, CARIN, and US Core Data',
90
+ value: 'combo-Group'
91
+ }
92
+ ]
93
+ }
76
94
 
77
95
  suite_endpoint :get, PATIENT_KICKOFF_ROUTE, Endpoints::KickOff
78
96
  suite_endpoint :get, GROUP_KICKOFF_ROUTE, Endpoints::KickOff
@@ -81,12 +99,11 @@ module BulkDataTestKit
81
99
  suite_endpoint :get, OUTPUT_ROUTE, Endpoints::Output
82
100
  suite_endpoint :delete, STATUS_ROUTE, Endpoints::Delete
83
101
 
84
- resume_test_route :get, RESUME_PASS_PATH do |request|
102
+ resume_test_route :get, RESUME_PASS_ROUTE do |request|
85
103
  request.query_parameters['id']
86
104
  end
87
105
 
88
106
  group from: :bulk_data_client_export_group
89
- group from: :bulk_data_client_delete_group
90
107
  end
91
108
  end
92
109
  end
@@ -2,8 +2,7 @@
2
2
 
3
3
  module BulkDataTestKit
4
4
  module BulkDataV200Client
5
- # Bulk Data Client - Export Wait
6
- class ExportWaitTest < Inferno::Test
5
+ class WaitTest < Inferno::Test
7
6
  include URLs
8
7
 
9
8
  title 'Wait For Request Sequence'
@@ -12,7 +11,7 @@ module BulkDataTestKit
12
11
  This test will receive bulk data export requests until the user confirms they are finished.
13
12
  )
14
13
 
15
- id :bulk_data_client_export_wait
14
+ id :bulk_data_client_wait
16
15
 
17
16
  input :access_token, :export_type, :group_id
18
17
 
@@ -22,22 +21,22 @@ module BulkDataTestKit
22
21
  message: %(
23
22
  Perform a **#{export_type}** endpoint type bulk export kick-off using the following base URL:
24
23
 
25
- #{kickoff_url}
24
+ #{fhir_url}
26
25
 
27
26
  #{export_type == GROUP_EXPORT_TYPE ? "Ensure the Group ID is set to **#{group_id}**." : ''}
28
27
 
29
28
  Include the following bearer access token with all requests: **#{access_token}**
30
29
 
31
- After the kick-off is made, a subsequent status request (using the URL provided in the response
32
- to the kick-off request) and then a download request (using the URL provided in the response to
33
- the status request) are expected.
30
+ After the kick-off is made, subsequent status request(s) (using the URL provided in the response
31
+ to the kick-off request), a download request (using the URL provided in the response to
32
+ the status request), and finally a delete request are expected.
34
33
 
35
- The entire request sequence will be recorded and used in the subsequent tests to
36
- verify comformity to the
34
+ The entire request sequence will be recorded and verified to check conformance to the
37
35
  [Bulk Data IG](https://build.fhir.org/ig/HL7/bulk-data/export.html#sequence-overview).
38
36
 
39
37
  [Click here](#{resume_pass_url}?id=#{access_token}) when finished.
40
- )
38
+ ),
39
+ timeout: 900
41
40
  )
42
41
  end
43
42
  end
@@ -20,14 +20,13 @@ Note: authentication options for these tests have not been finalized and are sub
20
20
  ### Sample Execution - Postman
21
21
 
22
22
  To try out these tests without a Bulk Data client implementation, you may
23
- run them using [this "bulk data client system export" Postman collection](https://github.com/inferno-framework/bulk-data-test-kit/blob/main/lib/bulk_data_test_kit/v2.0.0_client/postman/system_export.postman_collection.json) and [this "bulk data client delete" Postman collection](https://github.com/inferno-framework/bulk-data-test-kit/blob/main/lib/bulk_data_test_kit/v2.0.0_client/postman/delete.postman_collection.json).
23
+ run them using the [`Bulk Data Client - System Export Postman`](https://github.com/inferno-framework/bulk-data-test-kit/blob/main/lib/bulk_data_test_kit/v2.0.0_client/postman/collection.json) collection. This will kick-off an export, poll the status endpoint (respecting the `retry-after` header), download the first output result, and then delete the export.
24
24
 
25
- To run client tests against one of the Postman collections:
25
+ To run client tests against this Postman collection:
26
26
  1. Start an Inferno session of the Bulk Data Client test suite.
27
- 2. Navigate to either the export tests group or the delete tests group (depending on which Postman collection you want to use).
28
- 3. Click the "Run Tests" button in the upper right, enter any value (e.g. `SAMPLE_TOKEN`) as the access token, and select the "System Level Export" option for export type.
29
- 4. Click the "Submit" button. The simulated server will then be waiting for an interaction.
30
- 5. Open Postman and import the relevant Postman collection.
31
- 6. Set the `access_token` variable equal to the value entered in step 3 (the value is also displayed on the test modal in the Inferno UI for reference).
32
- 7. Run the collection.
33
- 8. Once the postman collection has run, click the "Click here" link in the wait dialog to evaluate the requests.
27
+ 2. Click the "Run All Tests" button in the upper right, enter any value (e.g. `SAMPLE_TOKEN`) as the access token, and select the "System Level Export" option for export type.
28
+ 3. Click the "Submit" button. The simulated server will start waiting for requests.
29
+ 4. Open Postman and import the relevant Postman collection.
30
+ 5. Set the `access_token` variable equal to the value entered in step 2 (the value is also displayed on the test modal in the Inferno UI for reference).
31
+ 6. Run the collection.
32
+ 7. Once the postman collection has run, click the "Click here" link in the Inferno wait dialog modal to evaluate the requests and generate the results.
@@ -3,8 +3,9 @@
3
3
  module BulkDataTestKit
4
4
  module BulkDataV200Client
5
5
  module Endpoints
6
- # Delete Endpoint
7
6
  class Delete < Inferno::DSL::SuiteEndpoint
7
+ include ServerProxy
8
+
8
9
  def test_run_identifier
9
10
  request.get_header('HTTP_AUTHORIZATION')&.split&.last
10
11
  end
@@ -16,6 +17,10 @@ module BulkDataTestKit
16
17
  def tags
17
18
  [DELETE_TAG]
18
19
  end
20
+
21
+ def job_id
22
+ request.params[:job_id]
23
+ end
19
24
  end
20
25
  end
21
26
  end
@@ -3,21 +3,31 @@
3
3
  module BulkDataTestKit
4
4
  module BulkDataV200Client
5
5
  module Endpoints
6
- # Kick Off Endpoint
7
6
  class KickOff < Inferno::DSL::SuiteEndpoint
8
7
  include URLs
8
+ include ServerProxy
9
9
 
10
10
  def test_run_identifier
11
11
  request.get_header('HTTP_AUTHORIZATION')&.split&.last
12
12
  end
13
13
 
14
+ # Proxy the request to the reference server, and re-use the returned '_jobId' as
15
+ # the identifier we'll return to the user for our own `content-location` header.
14
16
  def make_response
15
- response.status = 202
16
- response.headers['Content-Location'] = status_url
17
+ server_response = proxy_kickoff
18
+ case server_response.status
19
+ when 202
20
+ server_status_url = server_response.headers['content-location']
21
+ response.status = 202
22
+ response.headers['content-location'] = status_url.gsub(':job_id', job_id(server_status_url))
23
+ else
24
+ response.status = server_response.status
25
+ response.body = server_response.body
26
+ end
17
27
  end
18
28
 
19
29
  def tags
20
- case request_type.titleize
30
+ case request_type
21
31
  when PATIENT_EXPORT_TYPE
22
32
  [PATIENT_KICKOFF_TAG]
23
33
  when GROUP_EXPORT_TYPE
@@ -27,8 +37,32 @@ module BulkDataTestKit
27
37
  end
28
38
  end
29
39
 
40
+ def proxy_kickoff
41
+ case request_type
42
+ when PATIENT_EXPORT_TYPE
43
+ proxy_client.get('$export', request_params)
44
+ when GROUP_EXPORT_TYPE
45
+ proxy_client.get("#{request_type}/#{group_id}/$export", request_params)
46
+ when SYSTEM_EXPORT_TYPE
47
+ proxy_client.get('$export', request_params)
48
+ end
49
+ end
50
+
51
+ # Collect request params to forward to the reference server
52
+ def request_params
53
+ request.params.to_h.stringify_keys
54
+ end
55
+
30
56
  def request_type
31
- request.params[:type] || SYSTEM_EXPORT_TYPE
57
+ (request.params[:type] || SYSTEM_EXPORT_TYPE).titleize
58
+ end
59
+
60
+ def group_id
61
+ request.params[:group_id]
62
+ end
63
+
64
+ def job_id(url)
65
+ CGI.parse(URI.parse(url).query)['_jobId']&.first
32
66
  end
33
67
  end
34
68
  end
@@ -3,27 +3,34 @@
3
3
  module BulkDataTestKit
4
4
  module BulkDataV200Client
5
5
  module Endpoints
6
- # Output Endpoint
7
6
  class Output < Inferno::DSL::SuiteEndpoint
7
+ include ServerProxy
8
+
8
9
  def test_run_identifier
9
10
  request.get_header('HTTP_AUTHORIZATION')&.split&.last
10
11
  end
11
12
 
13
+ # Proxy the request to the reference server for a completed output file,
14
+ # using the same id provided with the completed status request.
12
15
  def make_response
13
- response.status = 200
14
- response.headers['Content-Type'] = 'application/fhir+ndjson'
15
- response.body = "#{example_patient.to_json.squish}\n"
16
+ server_response = proxy_client.get("Binary/#{binary_id}")
17
+
18
+ case server_response.status
19
+ when 200
20
+ response.status = 200
21
+ response.headers['Content-Type'] = 'application/fhir+ndjson'
22
+ else
23
+ response.status = server_response.status
24
+ end
25
+ response.body = server_response.body
16
26
  end
17
27
 
18
28
  def tags
19
29
  [OUTPUT_TAG]
20
30
  end
21
31
 
22
- def example_patient
23
- FHIR::Patient.new(
24
- id: test_run_identifier,
25
- name: FHIR::HumanName.new(given: 'Example', family: 'Patient')
26
- )
32
+ def binary_id
33
+ request.params[:binary_id]
27
34
  end
28
35
  end
29
36
  end
@@ -3,36 +3,59 @@
3
3
  module BulkDataTestKit
4
4
  module BulkDataV200Client
5
5
  module Endpoints
6
- # Status Endpoint
7
6
  class Status < Inferno::DSL::SuiteEndpoint
8
7
  include URLs
8
+ include ServerProxy
9
9
 
10
10
  def test_run_identifier
11
11
  request.get_header('HTTP_AUTHORIZATION')&.split&.last
12
12
  end
13
13
 
14
+ # Proxy the request to the reference server using the same `_jobId`` we received
15
+ # on kickoff, and respond with the current status. If the status is complete,
16
+ # return the output adjusted to point at Inferno.
14
17
  def make_response
15
- response.status = 200
16
- response.body = response_body.to_json
17
- response.format = :json
18
+ server_response = proxy_client.get("$export-poll-status?_jobId=#{job_id}")
19
+
20
+ case server_response.status
21
+ when 202
22
+ # In-Progress Status
23
+ response.status = 202
24
+ response.headers['retry-after'] = 120
25
+ when 200
26
+ # Complete Status
27
+ body = JSON.parse(server_response.body)
28
+ response.status = 200
29
+ response.body = response_body(body).to_json
30
+ response.format = :json
31
+ else
32
+ response.status = server_response.status
33
+ response.body = server_response.body
34
+ end
18
35
  end
19
36
 
20
37
  def tags
21
38
  [STATUS_TAG]
22
39
  end
23
40
 
24
- def response_body
41
+ def response_body(body)
42
+ output = body['output']&.map do |binary|
43
+ binary['url'] = rewrite_url_base(binary['url'])
44
+ binary
45
+ end
46
+
25
47
  {
26
48
  transactionTime: DateTime.now.iso8601,
27
- request: kickoff_url,
49
+ request: rewrite_url_base(body['request']),
28
50
  requiresAccessToken: true,
29
- output: [{
30
- type: 'Patient',
31
- url: output_url
32
- }],
51
+ output: output || [],
33
52
  error: []
34
53
  }
35
54
  end
55
+
56
+ def job_id
57
+ request.params[:job_id]
58
+ end
36
59
  end
37
60
  end
38
61
  end
@@ -11,7 +11,7 @@
11
11
  "listen": "test",
12
12
  "script": {
13
13
  "exec": [
14
- "pm.test(\"kick-off was accepted\", function () {",
14
+ "pm.test(\"export was kicked off\", function () {",
15
15
  " pm.response.to.have.status(202);",
16
16
  "});",
17
17
  "",
@@ -48,13 +48,20 @@
48
48
  "listen": "test",
49
49
  "script": {
50
50
  "exec": [
51
- "let responseData = pm.response.json();",
52
- "",
53
- "pm.test(\"export is complete\", function () {",
54
- " pm.response.to.have.status(200);",
51
+ "pm.test(\"status was checked\", function () {",
52
+ " pm.expect(pm.response.code).to.be.oneOf([200, 202]);",
55
53
  "});",
56
54
  "",
57
- "pm.collectionVariables.set(\"download_url\", responseData.output[0].url);",
55
+ "if (pm.response.code === 202) {",
56
+ " var retryAfter = pm.response.headers.get('retry-after');",
57
+ " var retryAfterMs = parseInt(retryAfter, 10) * 1000;",
58
+ " setTimeout(function() {",
59
+ " pm.execution.setNextRequest(pm.info.requestName);",
60
+ " }, retryAfterMs);",
61
+ "} else if (pm.response.code === 200) {",
62
+ " let responseData = pm.response.json();",
63
+ " pm.collectionVariables.set(\"download_url\", responseData.output[0].url);",
64
+ "}",
58
65
  ""
59
66
  ],
60
67
  "type": "text/javascript",
@@ -91,7 +98,7 @@
91
98
  "listen": "test",
92
99
  "script": {
93
100
  "exec": [
94
- "pm.test(\"downlaod is successful\", function () {",
101
+ "pm.test(\"output was downloaded\", function () {",
95
102
  " pm.response.to.have.status(200);",
96
103
  "});",
97
104
  ""
@@ -122,6 +129,45 @@
122
129
  }
123
130
  },
124
131
  "response": []
132
+ },
133
+ {
134
+ "name": "Delete",
135
+ "event": [
136
+ {
137
+ "listen": "test",
138
+ "script": {
139
+ "exec": [
140
+ "pm.test(\"export was deleted\", function () {",
141
+ " pm.response.to.have.status(202);",
142
+ "});",
143
+ ""
144
+ ],
145
+ "type": "text/javascript",
146
+ "packages": {}
147
+ }
148
+ },
149
+ {
150
+ "listen": "prerequest",
151
+ "script": {
152
+ "exec": [
153
+ ""
154
+ ],
155
+ "type": "text/javascript",
156
+ "packages": {}
157
+ }
158
+ }
159
+ ],
160
+ "request": {
161
+ "method": "DELETE",
162
+ "header": [],
163
+ "url": {
164
+ "raw": "{{status_url}}",
165
+ "host": [
166
+ "{{status_url}}"
167
+ ]
168
+ }
169
+ },
170
+ "response": []
125
171
  }
126
172
  ],
127
173
  "auth": {
@@ -159,7 +205,7 @@
159
205
  "variable": [
160
206
  {
161
207
  "key": "access_token",
162
- "value": "SAMPLE_TOKEN",
208
+ "value": "test",
163
209
  "type": "string"
164
210
  },
165
211
  {
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BulkDataTestKit
4
+ module BulkDataV200Client
5
+ module ServerProxy
6
+ include URLs
7
+
8
+ def proxy_client
9
+ @proxy_client ||= Faraday.new(
10
+ url: ENV.fetch('FHIR_REFERENCE_SERVER'),
11
+ params: {},
12
+ headers: request_headers
13
+ ) do |proxy|
14
+ proxy.use FaradayMiddleware::Gzip
15
+ proxy.options.params_encoder = Faraday::FlatParamsEncoder
16
+ end
17
+ end
18
+
19
+ def rewrite_url_base(url)
20
+ url.gsub(ENV.fetch('FHIR_REFERENCE_SERVER'), fhir_url)
21
+ end
22
+
23
+ def request_headers
24
+ {
25
+ 'Content-Type' => 'application/json',
26
+ 'Authorization' => 'Bearer SAMPLE_TOKEN',
27
+ 'Prefer' => 'respond-async'
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
@@ -2,26 +2,25 @@
2
2
 
3
3
  module BulkDataTestKit
4
4
  module BulkDataV200Client
5
- RESUME_PASS_PATH = '/resume_pass'
5
+ RESUME_PASS_ROUTE = '/resume_pass'
6
6
  BASE_ROUTE = '/fhir'
7
- METADATA_ROUTE = "#{BASE_ROUTE}/metadata".freeze
8
7
  PATIENT_KICKOFF_ROUTE = "#{BASE_ROUTE}/:type/$export".freeze
9
8
  GROUP_KICKOFF_ROUTE = "#{BASE_ROUTE}/:type/:group_id/$export".freeze
10
9
  SYSTEM_KICKOFF_ROUTE = "#{BASE_ROUTE}/$export".freeze
11
- STATUS_ROUTE = '/status'
12
- OUTPUT_ROUTE = '/output/example.ndjson'
10
+ STATUS_ROUTE = '/status/:job_id'
11
+ OUTPUT_ROUTE = "#{BASE_ROUTE}/Binary/:binary_id".freeze
13
12
 
14
13
  # URLs for use in Bulk Data Client tests and endpoints
15
14
  module URLs
16
15
  def base_url
17
- "#{Inferno::Application['base_url']}/custom/#{suite_id}"
16
+ "#{Inferno::Application['base_url']}/custom/bulk_data_v200_client"
18
17
  end
19
18
 
20
19
  def resume_pass_url
21
- base_url + RESUME_PASS_PATH
20
+ base_url + RESUME_PASS_ROUTE
22
21
  end
23
22
 
24
- def kickoff_url
23
+ def fhir_url
25
24
  base_url + BASE_ROUTE
26
25
  end
27
26
 
@@ -32,14 +31,6 @@ module BulkDataTestKit
32
31
  def output_url
33
32
  base_url + OUTPUT_ROUTE
34
33
  end
35
-
36
- def suite_id
37
- if respond_to?('result') # If being used with a suite endpoint
38
- result.test_id.split('-').first
39
- elsif self.class.respond_to?('suite') # If being used with a test/group/suite
40
- self.class.suite.id
41
- end
42
- end
43
34
  end
44
35
  end
45
36
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BulkDataTestKit
4
- VERSION = '0.11.1'
5
- LAST_UPDATED = '2026-03-06'
4
+ VERSION = '0.12.0'
5
+ LAST_UPDATED = '2025-03-25'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bulk_data_test_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Inferno Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-06 00:00:00.000000000 Z
11
+ date: 2025-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bloomer
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.6.2
47
+ version: 0.6.7
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.6.2
54
+ version: 0.6.7
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: json-jwt
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 0.5.0
117
+ version: 0.6.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: 0.5.0
124
+ version: 0.6.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: tls_test_kit
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -264,23 +264,21 @@ files:
264
264
  - lib/bulk_data_test_kit/v2.0.0/patient/bulk_data_patient_export_parameters_group.rb
265
265
  - lib/bulk_data_test_kit/v2.0.0/system_export/bulk_data_system_export_cancel_group.rb
266
266
  - lib/bulk_data_test_kit/v2.0.0/system_export/bulk_data_system_export_parameters_group.rb
267
- - lib/bulk_data_test_kit/v2.0.0_client/bulk_data_client_delete_group.rb
268
267
  - lib/bulk_data_test_kit/v2.0.0_client/bulk_data_client_delete_test.rb
269
- - lib/bulk_data_test_kit/v2.0.0_client/bulk_data_client_delete_wait_test.rb
270
268
  - lib/bulk_data_test_kit/v2.0.0_client/bulk_data_client_export_group.rb
271
- - lib/bulk_data_test_kit/v2.0.0_client/bulk_data_client_export_wait_test.rb
272
269
  - lib/bulk_data_test_kit/v2.0.0_client/bulk_data_client_kick_off_test.rb
273
270
  - lib/bulk_data_test_kit/v2.0.0_client/bulk_data_client_output_test.rb
274
271
  - lib/bulk_data_test_kit/v2.0.0_client/bulk_data_client_status_test.rb
275
272
  - lib/bulk_data_test_kit/v2.0.0_client/bulk_data_client_test_suite.rb
273
+ - lib/bulk_data_test_kit/v2.0.0_client/bulk_data_client_wait_test.rb
276
274
  - lib/bulk_data_test_kit/v2.0.0_client/docs/suite_description.md
277
275
  - lib/bulk_data_test_kit/v2.0.0_client/endpoints/delete.rb
278
276
  - lib/bulk_data_test_kit/v2.0.0_client/endpoints/kick_off.rb
279
277
  - lib/bulk_data_test_kit/v2.0.0_client/endpoints/output.rb
280
278
  - lib/bulk_data_test_kit/v2.0.0_client/endpoints/status.rb
281
279
  - lib/bulk_data_test_kit/v2.0.0_client/export_types.rb
282
- - lib/bulk_data_test_kit/v2.0.0_client/postman/delete.postman_collection.json
283
- - lib/bulk_data_test_kit/v2.0.0_client/postman/system_export.postman_collection.json
280
+ - lib/bulk_data_test_kit/v2.0.0_client/postman/collection.json
281
+ - lib/bulk_data_test_kit/v2.0.0_client/server_proxy.rb
284
282
  - lib/bulk_data_test_kit/v2.0.0_client/tags.rb
285
283
  - lib/bulk_data_test_kit/v2.0.0_client/urls.rb
286
284
  - lib/bulk_data_test_kit/version.rb
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'bulk_data_client_delete_wait_test'
4
- require_relative 'bulk_data_client_kick_off_test'
5
- require_relative 'bulk_data_client_delete_test'
6
-
7
- module BulkDataTestKit
8
- module BulkDataV200Client
9
- # Bulk Data Client Delete Tests
10
- class DeleteGroup < Inferno::TestGroup
11
- title 'Bulk Data Client Delete Tests'
12
-
13
- description %(
14
- The Bulk Data Client Delete tests verify the ability of a client to delete
15
- a kicked-off bulk data export request.
16
- )
17
-
18
- id :bulk_data_client_delete_group
19
-
20
- run_as_group
21
-
22
- test from: :bulk_data_client_delete_wait
23
- test from: :bulk_data_client_kick_off
24
- test from: :bulk_data_client_delete
25
- end
26
- end
27
- end