Class: BulkDataTestKit::BulkDataV101::BulkDataTestSuite

Inherits:
Inferno::TestSuite
  • Object
show all
Defined in:
lib/bulk_data_test_kit/v1.0.1/bulk_data_test_suite.rb

Constant Summary collapse

VALIDATION_MESSAGE_FILTERS =
[
  /Observation\.effective\.ofType\(Period\): .*vs-1:/, # Invalid invariant in FHIR v4.0.1
  /\A\S+: \S+: URL value '.*' does not resolve/
].freeze
VERSION_SPECIFIC_MESSAGE_FILTERS =
[].freeze

Class Method Summary collapse

Class Method Details

.jwks_jsonObject



70
71
72
73
74
75
76
77
78
# File 'lib/bulk_data_test_kit/v1.0.1/bulk_data_test_suite.rb', line 70

def self.jwks_json
  bulk_data_jwks = JSON.parse(File.read(
                                ENV.fetch('BULK_DATA_JWKS',
                                          File.join(File.expand_path('..', __dir__), 'bulk_data_jwks.json'))
                              ))
  @jwks_json ||= JSON.pretty_generate(
    { keys: bulk_data_jwks['keys'].select { |key| key['key_ops']&.include?('verify') } }
  )
end

.well_known_route_handlerObject



80
81
82
# File 'lib/bulk_data_test_kit/v1.0.1/bulk_data_test_suite.rb', line 80

def self.well_known_route_handler
  ->(_env) { [200, { 'Content-Type' => 'application/json' }, [jwks_json]] }
end