Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #478 from onc-healthit/fi-955-default-to-external
Browse files Browse the repository at this point in the history
FI-955 Default to External
  • Loading branch information
radamson authored Aug 7, 2020
2 parents d08a5cf + 7273f2c commit 0afb701
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ include_extras: true
badge_text: Community

# Resource validator options: must be one of "internal" or "external". external_resource_validator_url is only used if resource_validator is set to external.
resource_validator: internal
resource_validator: external
external_resource_validator_url: http://validator_service:4567

# module options: one or more must be set. The first option in the list will be checked by default
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
bdt_service:
image: infernocommunity/inferno-bdt-service
validator_service:
image: infernocommunity/fhir-validator-wrapper
image: infernocommunity/fhir-validator-service
nginx_server:
image: nginx
volumes:
Expand Down
2 changes: 2 additions & 0 deletions lib/app/utils/resource_validator_factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ module Inferno
class App
module ResourceValidatorFactory
def self.new_validator(selected_validator, external_validator_url)
return Inferno::FHIRModelsValidator.new if ENV['RACK_ENV'] == 'test'

case selected_validator
when 'internal'
Inferno::FHIRModelsValidator.new
Expand Down
4 changes: 3 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
add_filter '/test/'
end

ENV['RACK_ENV'] = 'test'
ENV['APP_ENV'] = ENV['RACK_ENV'] = 'test'

require 'minitest/autorun'
require 'webmock/minitest'
require 'rack/test'
Expand All @@ -23,6 +24,7 @@ def create_assertion_report?
end

require_relative '../lib/app'
Inferno::App::Endpoint.settings.resource_validator = 'internal'
Inferno::StartupTasks.load_all_modules

def find_fixture_directory(test_directory = nil)
Expand Down

0 comments on commit 0afb701

Please sign in to comment.