Class: Retab::WorkflowTestResult
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::WorkflowTestResult
- Defined in:
- lib/retab/workflow_test_run_results/workflow_test_result.rb
Constant Summary collapse
- HASH_ATTRS =
{ id: :id, run_id: :run_id, test_id: :test_id, lifecycle: :lifecycle, timing: :timing, verdict: :verdict, workflow_id: :workflow_id, target: :target, execution_fingerprint: :execution_fingerprint, handle_inputs_fingerprint: :handle_inputs_fingerprint, workflow_draft_fingerprint: :workflow_draft_fingerprint, block_config_fingerprint: :block_config_fingerprint, source: :source, outputs: :outputs, routing_decision: :routing_decision, warnings: :warnings, error: :error, skipped: :skipped, assertion_result: :assertion_result, verdict_summary: :verdict_summary }.freeze
Instance Attribute Summary collapse
-
#assertion_result ⇒ Object
Returns the value of attribute assertion_result.
-
#block_config_fingerprint ⇒ Object
Returns the value of attribute block_config_fingerprint.
-
#error ⇒ Object
Returns the value of attribute error.
-
#execution_fingerprint ⇒ Object
Returns the value of attribute execution_fingerprint.
-
#handle_inputs_fingerprint ⇒ Object
Returns the value of attribute handle_inputs_fingerprint.
-
#id ⇒ Object
Returns the value of attribute id.
-
#lifecycle ⇒ Object
Returns the value of attribute lifecycle.
-
#outputs ⇒ Object
Returns the value of attribute outputs.
-
#routing_decision ⇒ Object
Returns the value of attribute routing_decision.
-
#run_id ⇒ Object
Returns the value of attribute run_id.
-
#skipped ⇒ Object
Returns the value of attribute skipped.
-
#source ⇒ Object
Returns the value of attribute source.
-
#target ⇒ Object
Returns the value of attribute target.
-
#test_id ⇒ Object
Returns the value of attribute test_id.
-
#timing ⇒ Object
Returns the value of attribute timing.
-
#verdict ⇒ Object
Returns the value of attribute verdict.
-
#verdict_summary ⇒ Object
Returns the value of attribute verdict_summary.
-
#warnings ⇒ Object
Returns the value of attribute warnings.
-
#workflow_draft_fingerprint ⇒ Object
Returns the value of attribute workflow_draft_fingerprint.
-
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ WorkflowTestResult
constructor
A new instance of WorkflowTestResult.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ WorkflowTestResult
Returns a new instance of WorkflowTestResult.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 53 def initialize(json) hash = self.class.normalize(json) @id = hash[:id] @run_id = hash[:run_id] @test_id = hash[:test_id] @lifecycle = hash[:lifecycle] ? (case hash[:lifecycle][:status] when "cancelled" then Retab::CancelledWorkflowTestRun.new(hash[:lifecycle]) when "completed" then Retab::CompletedWorkflowTestRun.new(hash[:lifecycle]) when "error" then Retab::ErrorWorkflowTestRun.new(hash[:lifecycle]) when "pending" then Retab::PendingWorkflowTestRun.new(hash[:lifecycle]) when "queued" then Retab::QueuedWorkflowTestRun.new(hash[:lifecycle]) when "running" then Retab::RunningWorkflowTestRun.new(hash[:lifecycle]) else hash[:lifecycle] end) : nil @timing = hash[:timing] ? Retab::WorkflowTestRunTiming.new(hash[:timing]) : nil @verdict = hash[:verdict] @workflow_id = hash[:workflow_id] @target = hash[:target] ? Retab::WorkflowTestBlockTarget.new(hash[:target]) : nil @execution_fingerprint = hash[:execution_fingerprint] @handle_inputs_fingerprint = hash[:handle_inputs_fingerprint] @workflow_draft_fingerprint = hash[:workflow_draft_fingerprint] @block_config_fingerprint = hash[:block_config_fingerprint] @source = hash[:source] ? (case hash[:source][:type] when "manual" then Retab::ManualWorkflowTestSource.new(hash[:source]) when "run_step" then Retab::RunStepWorkflowTestSource.new(hash[:source]) else hash[:source] end) : nil @outputs = hash[:outputs] || {} @routing_decision = (hash[:routing_decision] || []) @warnings = (hash[:warnings] || []) @error = hash[:error] ? Retab::ErrorDetails.new(hash[:error]) : nil @skipped = hash[:skipped] @assertion_result = hash[:assertion_result] ? Retab::AssertionResult.new(hash[:assertion_result]) : nil @verdict_summary = hash[:verdict_summary] ? Retab::VerdictSummary.new(hash[:verdict_summary]) : nil end |
Instance Attribute Details
#assertion_result ⇒ Object
Returns the value of attribute assertion_result.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def assertion_result @assertion_result end |
#block_config_fingerprint ⇒ Object
Returns the value of attribute block_config_fingerprint.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def block_config_fingerprint @block_config_fingerprint end |
#error ⇒ Object
Returns the value of attribute error.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def error @error end |
#execution_fingerprint ⇒ Object
Returns the value of attribute execution_fingerprint.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def execution_fingerprint @execution_fingerprint end |
#handle_inputs_fingerprint ⇒ Object
Returns the value of attribute handle_inputs_fingerprint.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def handle_inputs_fingerprint @handle_inputs_fingerprint end |
#id ⇒ Object
Returns the value of attribute id.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def id @id end |
#lifecycle ⇒ Object
Returns the value of attribute lifecycle.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def lifecycle @lifecycle end |
#outputs ⇒ Object
Returns the value of attribute outputs.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def outputs @outputs end |
#routing_decision ⇒ Object
Returns the value of attribute routing_decision.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def routing_decision @routing_decision end |
#run_id ⇒ Object
Returns the value of attribute run_id.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def run_id @run_id end |
#skipped ⇒ Object
Returns the value of attribute skipped.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def skipped @skipped end |
#source ⇒ Object
Returns the value of attribute source.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def source @source end |
#target ⇒ Object
Returns the value of attribute target.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def target @target end |
#test_id ⇒ Object
Returns the value of attribute test_id.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def test_id @test_id end |
#timing ⇒ Object
Returns the value of attribute timing.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def timing @timing end |
#verdict ⇒ Object
Returns the value of attribute verdict.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def verdict @verdict end |
#verdict_summary ⇒ Object
Returns the value of attribute verdict_summary.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def verdict_summary @verdict_summary end |
#warnings ⇒ Object
Returns the value of attribute warnings.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def warnings @warnings end |
#workflow_draft_fingerprint ⇒ Object
Returns the value of attribute workflow_draft_fingerprint.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def workflow_draft_fingerprint @workflow_draft_fingerprint end |
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def workflow_id @workflow_id end |