Class: Kitchen::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/kitchen/binding/core_ext/config.rb

Overview

Override certain methods from Kitchen::Config to allow use of Kitchen::Binding

Instance Method Summary collapse

Instance Method Details

#kitchen_configHash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Generates the immutable Test Kitchen configuration and reasonable defaults for Drivers, Provisioners and Bindings.

Returns:

  • (Hash)

    a configuration Hash



28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/kitchen/binding/core_ext/config.rb', line 28

def kitchen_config
  @kitchen_config ||= {
    :defaults => {
      :driver       => Driver::DEFAULT_PLUGIN,
      :provisioner  => Provisioner::DEFAULT_PLUGIN,
      :binding      => Binding::DEFAULT_PLUGIN
    },
    :kitchen_root   => kitchen_root,
    :test_base_path => test_base_path,
    :log_level      => log_level
  }
end

#new_instance(suite, platform, index) ⇒ Instance

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Builds a newly configured Instance object, for a given Suite and Platform.

Parameters:

  • suite (Suite, #name)

    a Suite

  • platform (Platform, #name)

    a Platform

  • index (Integer)

    an index used for colorizing output

Returns:



49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/kitchen/binding/core_ext/config.rb', line 49

def new_instance(suite, platform, index)
  Instance.new(
    :busser       => new_busser(suite, platform),
    :driver       => new_driver(suite, platform),
    :logger       => new_logger(suite, platform, index),
    :suite        => suite,
    :platform     => platform,
    :provisioner  => new_provisioner(suite, platform),
    :binding      => new_binding(suite, platform),
    :state_file   => new_state_file(suite, platform)
  )
end