Class: Kitchen::Provisioner::ChefExtendedAttributes

Inherits:
ChefSolo
  • Object
show all
Defined in:
lib/kitchen/provisioner/chef_extended_attributes.rb

Overview

Define a new test-kitchen provisioner, based on the chef-solo provisioner with an additional load step to insert our pre-defined / generated dna.json file before the chef run begins

Instance Method Summary collapse

Instance Method Details

#create_sandboxObject

At the time of this hook being run, ‘sandbox_path` has been created, populated, but not yet copied across to the destination environment



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/kitchen/provisioner/chef_extended_attributes.rb', line 16

def create_sandbox
  super
  debug('hooking create_sandbox')
  backup_original_dna_json
  if config[:merge_attributes]
    prepare_merged_json
  else
    prepare_overridden_json
  end
  debug('finished hooks')
end