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, workflow_test_run_id: :workflow_test_run_id, test_id: :test_id, lifecycle: :lifecycle, timing: :timing, verdict: :verdict, workflow_id: :workflow_id, block_id: :block_id, block_type: :block_type, execution_fingerprint: :execution_fingerprint, handle_inputs_fingerprint: :handle_inputs_fingerprint, workflow_draft_fingerprint: :workflow_draft_fingerprint, block_config_fingerprint: :block_config_fingerprint, artifact: :artifact, handle_inputs: :handle_inputs, handle_outputs: :handle_outputs, routing_decisions: :routing_decisions, warnings: :warnings, assertion_result: :assertion_result, verdict_summary: :verdict_summary }.freeze
Instance Attribute Summary collapse
-
#artifact ⇒ Object
Returns the value of attribute artifact.
-
#assertion_result ⇒ Object
Returns the value of attribute assertion_result.
-
#block_config_fingerprint ⇒ Object
Returns the value of attribute block_config_fingerprint.
-
#block_id ⇒ Object
Returns the value of attribute block_id.
-
#block_type ⇒ Object
Returns the value of attribute block_type.
-
#execution_fingerprint ⇒ Object
Returns the value of attribute execution_fingerprint.
-
#handle_inputs ⇒ Object
Returns the value of attribute handle_inputs.
-
#handle_inputs_fingerprint ⇒ Object
Returns the value of attribute handle_inputs_fingerprint.
-
#handle_outputs ⇒ Object
Returns the value of attribute handle_outputs.
-
#id ⇒ Object
Returns the value of attribute id.
-
#lifecycle ⇒ Object
Returns the value of attribute lifecycle.
-
#routing_decisions ⇒ Object
Returns the value of attribute routing_decisions.
-
#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.
-
#workflow_test_run_id ⇒ Object
Returns the value of attribute workflow_test_run_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ WorkflowTestResult
constructor
A new instance of WorkflowTestResult.
Methods inherited from Types::BaseModel
deep_symbolize, #inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ WorkflowTestResult
Returns a new instance of WorkflowTestResult.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 54 def initialize(json) super() hash = self.class.normalize(json) @id = hash[:id] @workflow_test_run_id = hash[:workflow_test_run_id] @test_id = hash[:test_id] @lifecycle = hash[:lifecycle] ? ( case hash[:lifecycle][:status] when "cancelled" Retab::CancelledWorkflowTestRun.new(hash[:lifecycle]) when "completed" Retab::CompletedWorkflowTestRun.new(hash[:lifecycle]) when "error" Retab::ErrorWorkflowTestRun.new(hash[:lifecycle]) when "pending" Retab::PendingWorkflowTestRun.new(hash[:lifecycle]) when "queued" Retab::QueuedWorkflowTestRun.new(hash[:lifecycle]) when "running" 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] @block_id = hash[:block_id] @block_type = hash[:block_type] @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] @artifact = hash[:artifact] ? Retab::StepArtifactRef.new(hash[:artifact]) : nil @handle_inputs = hash[:handle_inputs] || {} @handle_outputs = hash[:handle_outputs] || {} @routing_decisions = (hash[:routing_decisions] || []) @warnings = (hash[:warnings] || []) @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
#artifact ⇒ Object
Returns the value of attribute artifact.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def artifact @artifact end |
#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 |
#block_id ⇒ Object
Returns the value of attribute block_id.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def block_id @block_id end |
#block_type ⇒ Object
Returns the value of attribute block_type.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def block_type @block_type 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 ⇒ Object
Returns the value of attribute handle_inputs.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def handle_inputs @handle_inputs 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 |
#handle_outputs ⇒ Object
Returns the value of attribute handle_outputs.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def handle_outputs @handle_outputs 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 |
#routing_decisions ⇒ Object
Returns the value of attribute routing_decisions.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def routing_decisions @routing_decisions 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 |
#workflow_test_run_id ⇒ Object
Returns the value of attribute workflow_test_run_id.
31 32 33 |
# File 'lib/retab/workflow_test_run_results/workflow_test_result.rb', line 31 def workflow_test_run_id @workflow_test_run_id end |