Sha256: 1615b3d9da8373fe0b20492f89e7cfa7fbe0189fd342356f4b2b2d1aa690c66e

Contents?: true

Size: 1.41 KB

Versions: 4

Compression:

Stored size: 1.41 KB

Contents

# frozen_string_literal: true

require_relative '../export_operation_tests'

module BulkDataTestKit
  module BulkDataV101
    class BulkDataStatusCheckTest < Inferno::Test
      include BulkDataTestKit::BulkDataExportOperationTests

      id :bulk_data_status_check

      title 'Bulk Data Server returns "202 Accepted" or "200 OK" for status check'
      description <<~DESCRIPTION
        Clients SHOULD follow an exponential backoff approach when polling for status. Servers SHOULD respond with

        * In-Progress Status: HTTP Status Code of 202 Accepted
        * Complete Status: HTTP status of 200 OK and Content-Type header of application/json

        The JSON object of Complete Status SHALL contain these required field:

        * transactionTime, request, requiresAccessToken, output, and error
      DESCRIPTION
      # link 'http://hl7.org/fhir/uv/bulkdata/STU1.0.1/export/index.html#bulk-data-status-request'

      input :polling_url, :bulk_timeout
      input :bearer_token,
            optional: true

      output :status_response, :requires_access_token

      def self.properties
        @properties ||= BulkDataTestKitProperties.new(
          resource_type: config.options[:resource_type]
        )
      end

      run do
        requires_access_token, status_response = export_status_check_success(polling_url)

        output(requires_access_token:)
        output status_response:
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bulk_data_test_kit-0.11.1 lib/bulk_data_test_kit/v1.0.1/bulk_data_status_check_test.rb
bulk_data_test_kit-0.11.0 lib/bulk_data_test_kit/v1.0.1/bulk_data_status_check_test.rb
bulk_data_test_kit-0.10.1 lib/bulk_data_test_kit/v1.0.1/bulk_data_status_check_test.rb
bulk_data_test_kit-0.10.0 lib/bulk_data_test_kit/v1.0.1/bulk_data_status_check_test.rb