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, kitchen_driver_api_version, no_parallel_for

Methods included from Logging

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

Methods included from Configurable

#[], #bourne_shell?, #calculate_path, #config_keys, #diagnose, #diagnose_plugin, #finalize_config!, included, #name, #powershell_shell?, #remote_path_join, #unix_os?, #verify_dependencies, #windows_os?

Constructor Details

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

Instance Method Details

#create(state) ⇒ Object

Creates an instance.

Parameters:

  • state (Hash)

    mutable instance and driver state

Raises:



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

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:



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

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

#setup(state) ⇒ Object



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

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

#verify(state) ⇒ Object



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

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