Last change
on this file since 30903 was 30903, checked in by davidb, 8 years ago |
Vagrant provisioning files for a 4-node Hadoop cluster. See README.txt for more details
|
-
Property svn:executable
set to
*
|
File size:
659 bytes
|
Rev | Line | |
---|
[30903] | 1 | #! /usr/bin/env ruby -S rspec
|
---|
| 2 | require 'spec_helper_acceptance'
|
---|
| 3 |
|
---|
| 4 | describe 'deep_merge function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
|
---|
| 5 | describe 'success' do
|
---|
| 6 | it 'should deep merge two hashes' do
|
---|
| 7 | pp = <<-EOS
|
---|
| 8 | $hash1 = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } }
|
---|
| 9 | $hash2 = {'two' => 'dos', 'three' => { 'five' => 5 } }
|
---|
| 10 | $merged_hash = deep_merge($hash1, $hash2)
|
---|
| 11 |
|
---|
| 12 | if $merged_hash != { 'one' => 1, 'two' => 'dos', 'three' => { 'four' => 4, 'five' => 5 } } {
|
---|
| 13 | fail("Hash was incorrectly merged.")
|
---|
| 14 | }
|
---|
| 15 | EOS
|
---|
| 16 |
|
---|
| 17 | apply_manifest(pp, :catch_failures => true)
|
---|
| 18 | end
|
---|
| 19 | end
|
---|
| 20 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.