From 9d6e3f19865e8aa824d8cdefa52d40f9fcaabdf8 Mon Sep 17 00:00:00 2001 From: rpassas <35311744+rpassas@users.noreply.github.com> Date: Fri, 2 Feb 2024 13:00:52 -0500 Subject: [PATCH] fi-2237 setting default validator url (#443) * setting default validator url * fix url method getter --- dev_suites/dev_demo_ig_stu1/demo_suite.rb | 1 - lib/inferno/dsl/fhir_resource_validation.rb | 2 +- lib/inferno/dsl/fhir_validation.rb | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dev_suites/dev_demo_ig_stu1/demo_suite.rb b/dev_suites/dev_demo_ig_stu1/demo_suite.rb index 557c3b374..1252356eb 100644 --- a/dev_suites/dev_demo_ig_stu1/demo_suite.rb +++ b/dev_suites/dev_demo_ig_stu1/demo_suite.rb @@ -48,7 +48,6 @@ class DemoSuite < Inferno::TestSuite end validator do - url ENV.fetch('VALIDATOR_URL') exclude_message { |message| message.type == 'info' } end diff --git a/lib/inferno/dsl/fhir_resource_validation.rb b/lib/inferno/dsl/fhir_resource_validation.rb index 425866524..e7bd2598f 100644 --- a/lib/inferno/dsl/fhir_resource_validation.rb +++ b/lib/inferno/dsl/fhir_resource_validation.rb @@ -45,7 +45,7 @@ def default_validator_url # @param validator_url [String] def url(validator_url = nil) @url = validator_url if validator_url - + @url ||= default_validator_url @url end diff --git a/lib/inferno/dsl/fhir_validation.rb b/lib/inferno/dsl/fhir_validation.rb index 5a8436980..24c8ce0ca 100644 --- a/lib/inferno/dsl/fhir_validation.rb +++ b/lib/inferno/dsl/fhir_validation.rb @@ -60,7 +60,7 @@ def default_validator_url # @param validator_url [String] def url(validator_url = nil) @url = validator_url if validator_url - + @url ||= default_validator_url @url end