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

FI-955 Default to External #478

Merged
merged 2 commits into from
Aug 7, 2020
Merged
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
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