Class: Kitchen::Terraform::SystemsVerifier::FailFast

Inherits:
Object
  • Object
show all
Defined in:
lib/kitchen/terraform/systems_verifier/fail_fast.rb

Overview

FailFast is the class of objects which verify systems and raise rescued errors immediately.

Instance Method Summary collapse

Constructor Details

#initialize(systems:) ⇒ Kitchen::Terraform::SystemsVerifier::FailFast

#initialize prepares a new instance of the class.

Parameters:



28
29
30
# File 'lib/kitchen/terraform/systems_verifier/fail_fast.rb', line 28

def initialize(systems:)
  self.systems = systems
end

Instance Method Details

#verify(outputs:, variables:) ⇒ self

#verify verifies each system.

Parameters:

  • outputs (Hash)

    a mapping of Terraform outputs.

  • variables (Hash)

    a mapping of Terraform variables.

Returns:

  • (self)

Raises:

  • (Kitchen::TransientFailure)

    if verification of a system fails.



38
39
40
41
42
43
44
# File 'lib/kitchen/terraform/systems_verifier/fail_fast.rb', line 38

def verify(outputs:, variables:)
  systems.each do |system|
    system.verify fail_fast: true, outputs: outputs, variables: variables
  end

  self
end