Class: Kitchen::Driver::Dummy

Inherits:
Base
  • Object
show all
Defined in:
lib/kitchen/driver/dummy.rb

Overview

Dummy driver for Kitchen. This driver does nothing but report what would happen if this driver did anything of consequence. As a result it may be a useful driver to use when debugging or developing new features or plugins.

Author:

Instance Attribute Summary

Attributes included from Configurable

#instance

Instance Method Summary collapse

Methods inherited from Base

#initialize, #login_command, #name, no_parallel_for, #verify_dependencies

Methods included from Logging

#banner, #debug, #error, #fatal, #info, #warn

Methods included from Configurable

#[], #calculate_path, #config_keys, #diagnose, #finalize_config!, included

Methods included from ShellOut

#run_command

Constructor Details

This class inherits a constructor from Kitchen::Driver::Base

Instance Method Details

#converge(state) ⇒ Object

Converges a running instance.

Parameters:

  • state (Hash)

    mutable instance and driver state

Raises:



43
44
45
# File 'lib/kitchen/driver/dummy.rb', line 43

def converge(state)
  report(:converge, state)
end

#create(state) ⇒ Object

Creates an instance.

Parameters:

  • state (Hash)

    mutable instance and driver state

Raises:



37
38
39
40
# File 'lib/kitchen/driver/dummy.rb', line 37

def create(state)
  state[:my_id] = "#{instance.name}-#{Time.now.to_i}"
  report(:create, state)
end

#destroy(state) ⇒ Object

Destroys an instance.

Parameters:

  • state (Hash)

    mutable instance and driver state

Raises:



58
59
60
61
# File 'lib/kitchen/driver/dummy.rb', line 58

def destroy(state)
  report(:destroy, state)
  state.delete(:my_id)
end

#setup(state) ⇒ Object

Sets up an instance.

Parameters:

  • state (Hash)

    mutable instance and driver state

Raises:



48
49
50
# File 'lib/kitchen/driver/dummy.rb', line 48

def setup(state)
  report(:setup, state)
end

#verify(state) ⇒ Object

Verifies a converged instance.

Parameters:

  • state (Hash)

    mutable instance and driver state

Raises:



53
54
55
# File 'lib/kitchen/driver/dummy.rb', line 53

def verify(state)
  report(:verify, state)
end