Class: QaServer::ScenariosLoaderService
- Inherits:
-
Object
- Object
- QaServer::ScenariosLoaderService
- Defined in:
- app/services/qa_server/scenarios_loader_service.rb
Class Method Summary collapse
-
.load(authority_name:, status_log:) ⇒ Scenarios
Load scenarios for testing an authority.
Class Method Details
.load(authority_name:, status_log:) ⇒ Scenarios
Load scenarios for testing an authority
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/services/qa_server/scenarios_loader_service.rb', line 9 def self.load(authority_name:, status_log:) begin = (, status_log) return nil if .blank? return nil unless scenarios_exist?(, status_log) scenarios_config = load_config(, status_log) return nil if scenarios_config.blank? scenarios = QaServer::Scenarios.new(authority: , authority_name: , scenarios_config: scenarios_config) rescue Exception => e status_log.add(authority_name: , status: QaServer::ScenarioValidator::FAIL, error_message: "Unable to load scenarios for authority '#{}'; cause: #{e.}") return nil end scenarios end |