From 890ef5c471027eb164e0296d4fd172a0115319d6 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Tue, 6 May 2014 18:48:59 -0700 Subject: Adding more spec coverage --- spec/acceptance/delete_values_spec.rb | 25 +++++++ spec/acceptance/difference_spec.rb | 26 +++++++ spec/acceptance/dirname_spec.rb | 42 +++++++++++ spec/acceptance/downcase_spec.rb | 39 ++++++++++ spec/acceptance/empty_spec.rb | 39 ++++++++++ spec/acceptance/ensure_packages_spec.rb | 24 ++++++ spec/acceptance/ensure_resource_spec.rb | 24 ++++++ spec/acceptance/flatten_spec.rb | 39 ++++++++++ spec/acceptance/floor_spec.rb | 39 ++++++++++ spec/acceptance/fqdn_rotate_spec.rb | 33 +++++++++ spec/acceptance/get_module_path_spec.rb | 41 +++++++++++ spec/acceptance/getparam_spec.rb | 25 +++++++ spec/acceptance/getvar_spec.rb | 26 +++++++ spec/acceptance/grep_spec.rb | 26 +++++++ spec/acceptance/has_interface_with_spec.rb | 44 +++++++++++ spec/acceptance/has_ip_address_spec.rb | 33 +++++++++ spec/acceptance/has_ip_network_spec.rb | 33 +++++++++ spec/acceptance/has_key_spec.rb | 41 +++++++++++ spec/acceptance/hash_spec.rb | 26 +++++++ spec/acceptance/intersection_spec.rb | 27 +++++++ spec/acceptance/is_array_spec.rb | 67 +++++++++++++++++ spec/acceptance/is_bool_spec.rb | 81 ++++++++++++++++++++ spec/acceptance/is_domain_name_spec.rb | 83 +++++++++++++++++++++ spec/acceptance/is_float_spec.rb | 86 ++++++++++++++++++++++ spec/acceptance/is_function_available_spec.rb | 58 +++++++++++++++ spec/acceptance/is_hash_spec.rb | 63 ++++++++++++++++ spec/acceptance/is_integer_spec.rb | 95 ++++++++++++++++++++++++ spec/acceptance/is_ip_address_spec.rb | 80 ++++++++++++++++++++ spec/acceptance/is_mac_address_spec.rb | 38 ++++++++++ spec/acceptance/is_numeric_spec.rb | 95 ++++++++++++++++++++++++ spec/acceptance/is_string_spec.rb | 102 ++++++++++++++++++++++++++ spec/acceptance/join_keys_to_values_spec.rb | 24 ++++++ spec/acceptance/join_spec.rb | 26 +++++++ spec/acceptance/keys_spec.rb | 23 ++++++ spec/acceptance/loadyaml_spec.rb | 31 ++++++++ spec/acceptance/lstrip_spec.rb | 34 +++++++++ spec/acceptance/max_spec.rb | 20 +++++ spec/acceptance/member_spec.rb | 26 +++++++ spec/acceptance/merge_spec.rb | 23 ++++++ spec/acceptance/min_spec.rb | 20 +++++ spec/acceptance/nodesets/centos-6-vcloud.yml | 15 ++++ spec/spec_helper_acceptance.rb | 20 +++-- 42 files changed, 1751 insertions(+), 11 deletions(-) create mode 100644 spec/acceptance/delete_values_spec.rb create mode 100644 spec/acceptance/difference_spec.rb create mode 100644 spec/acceptance/dirname_spec.rb create mode 100644 spec/acceptance/downcase_spec.rb create mode 100644 spec/acceptance/empty_spec.rb create mode 100644 spec/acceptance/ensure_packages_spec.rb create mode 100755 spec/acceptance/ensure_resource_spec.rb create mode 100644 spec/acceptance/flatten_spec.rb create mode 100644 spec/acceptance/floor_spec.rb create mode 100644 spec/acceptance/fqdn_rotate_spec.rb create mode 100644 spec/acceptance/get_module_path_spec.rb create mode 100755 spec/acceptance/getparam_spec.rb create mode 100644 spec/acceptance/getvar_spec.rb create mode 100644 spec/acceptance/grep_spec.rb create mode 100644 spec/acceptance/has_interface_with_spec.rb create mode 100755 spec/acceptance/has_ip_address_spec.rb create mode 100755 spec/acceptance/has_ip_network_spec.rb create mode 100644 spec/acceptance/has_key_spec.rb create mode 100644 spec/acceptance/hash_spec.rb create mode 100644 spec/acceptance/intersection_spec.rb create mode 100644 spec/acceptance/is_array_spec.rb create mode 100644 spec/acceptance/is_bool_spec.rb create mode 100644 spec/acceptance/is_domain_name_spec.rb create mode 100644 spec/acceptance/is_float_spec.rb create mode 100644 spec/acceptance/is_function_available_spec.rb create mode 100644 spec/acceptance/is_hash_spec.rb create mode 100644 spec/acceptance/is_integer_spec.rb create mode 100644 spec/acceptance/is_ip_address_spec.rb create mode 100644 spec/acceptance/is_mac_address_spec.rb create mode 100644 spec/acceptance/is_numeric_spec.rb create mode 100644 spec/acceptance/is_string_spec.rb create mode 100644 spec/acceptance/join_keys_to_values_spec.rb create mode 100644 spec/acceptance/join_spec.rb create mode 100644 spec/acceptance/keys_spec.rb create mode 100644 spec/acceptance/loadyaml_spec.rb create mode 100644 spec/acceptance/lstrip_spec.rb create mode 100644 spec/acceptance/max_spec.rb create mode 100644 spec/acceptance/member_spec.rb create mode 100644 spec/acceptance/merge_spec.rb create mode 100644 spec/acceptance/min_spec.rb create mode 100644 spec/acceptance/nodesets/centos-6-vcloud.yml diff --git a/spec/acceptance/delete_values_spec.rb b/spec/acceptance/delete_values_spec.rb new file mode 100644 index 0000000..6d2369c --- /dev/null +++ b/spec/acceptance/delete_values_spec.rb @@ -0,0 +1,25 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'delete_values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'should delete elements of the hash' do + pp = <<-EOS + $a = { 'a' => 'A', 'b' => 'B', 'B' => 'C', 'd' => 'B' } + $b = { 'a' => 'A', 'B' => 'C' } + $o = delete_values($a, 'B') + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles non-hash arguments' + it 'handles improper argument counts' + end +end diff --git a/spec/acceptance/difference_spec.rb b/spec/acceptance/difference_spec.rb new file mode 100644 index 0000000..2fae5c4 --- /dev/null +++ b/spec/acceptance/difference_spec.rb @@ -0,0 +1,26 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'difference function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'returns non-duplicates in the first array' do + pp = <<-EOS + $a = ['a','b','c'] + $b = ['b','c','d'] + $c = ['a'] + $o = difference($a, $b) + if $o == $c { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles non-array arguments' + it 'handles improper argument counts' + end +end diff --git a/spec/acceptance/dirname_spec.rb b/spec/acceptance/dirname_spec.rb new file mode 100644 index 0000000..97913dd --- /dev/null +++ b/spec/acceptance/dirname_spec.rb @@ -0,0 +1,42 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'dirname function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + context 'absolute path' do + it 'returns the dirname' do + pp = <<-EOS + $a = '/path/to/a/file.txt' + $b = '/path/to/a' + $o = dirname($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + context 'relative path' do + it 'returns the dirname' do + pp = <<-EOS + $a = 'path/to/a/file.txt' + $b = 'path/to/a' + $o = dirname($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + end + describe 'failure' do + it 'handles improper argument counts' + end +end diff --git a/spec/acceptance/downcase_spec.rb b/spec/acceptance/downcase_spec.rb new file mode 100644 index 0000000..bc4e706 --- /dev/null +++ b/spec/acceptance/downcase_spec.rb @@ -0,0 +1,39 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'downcase function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'returns the downcase' do + pp = <<-EOS + $a = 'AOEU' + $b = 'aoeu' + $o = downcase($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'doesn\'t affect lowercase words' do + pp = <<-EOS + $a = 'aoeu aoeu' + $b = 'aoeu aoeu' + $o = downcase($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-strings' + end +end diff --git a/spec/acceptance/empty_spec.rb b/spec/acceptance/empty_spec.rb new file mode 100644 index 0000000..8b46aac --- /dev/null +++ b/spec/acceptance/empty_spec.rb @@ -0,0 +1,39 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'empty function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'recognizes empty strings' do + pp = <<-EOS + $a = '' + $b = true + $o = empty($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'recognizes non-empty strings' do + pp = <<-EOS + $a = 'aoeu' + $b = false + $o = empty($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-strings' + end +end diff --git a/spec/acceptance/ensure_packages_spec.rb b/spec/acceptance/ensure_packages_spec.rb new file mode 100644 index 0000000..145bdc5 --- /dev/null +++ b/spec/acceptance/ensure_packages_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'ensure_packages function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'ensure_packages a package' do + apply_manifest('package { "zsh": ensure => absent, }') + pp = <<-EOS + $a = "zsh" + ensure_packages($a) + EOS + + apply_manifest(pp, :expect_changes => true) do |r| + expect(r.stdout).to match(/Package\[zsh\]\/ensure: created/) + end + end + it 'ensures a package already declared' + it 'takes defaults arguments' + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings' + end +end diff --git a/spec/acceptance/ensure_resource_spec.rb b/spec/acceptance/ensure_resource_spec.rb new file mode 100755 index 0000000..c4d8887 --- /dev/null +++ b/spec/acceptance/ensure_resource_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'ensure_resource function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'ensure_resource a package' do + apply_manifest('package { "zsh": ensure => absent, }') + pp = <<-EOS + $a = "zsh" + ensure_resource('package', $a) + EOS + + apply_manifest(pp, :expect_changes => true) do |r| + expect(r.stdout).to match(/Package\[zsh\]\/ensure: created/) + end + end + it 'ensures a resource already declared' + it 'takes defaults arguments' + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings' + end +end diff --git a/spec/acceptance/flatten_spec.rb b/spec/acceptance/flatten_spec.rb new file mode 100644 index 0000000..c4d66e0 --- /dev/null +++ b/spec/acceptance/flatten_spec.rb @@ -0,0 +1,39 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'flatten function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'flattens arrays' do + pp = <<-EOS + $a = ["a","b",["c",["d","e"],"f","g"]] + $b = ["a","b","c","d","e","f","g"] + $o = flatten($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'does not affect flat arrays' do + pp = <<-EOS + $a = ["a","b","c","d","e","f","g"] + $b = ["a","b","c","d","e","f","g"] + $o = flatten($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-strings' + end +end diff --git a/spec/acceptance/floor_spec.rb b/spec/acceptance/floor_spec.rb new file mode 100644 index 0000000..0dcdad9 --- /dev/null +++ b/spec/acceptance/floor_spec.rb @@ -0,0 +1,39 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'floor function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'floors floats' do + pp = <<-EOS + $a = 12.8 + $b = 12 + $o = floor($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'floors integers' do + pp = <<-EOS + $a = 7 + $b = 7 + $o = floor($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-numbers' + end +end diff --git a/spec/acceptance/fqdn_rotate_spec.rb b/spec/acceptance/fqdn_rotate_spec.rb new file mode 100644 index 0000000..b7f8bf8 --- /dev/null +++ b/spec/acceptance/fqdn_rotate_spec.rb @@ -0,0 +1,33 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'fqdn_rotate function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + let(:facts_d) do + if fact('is_pe') == "true" + '/etc/puppetlabs/facter/facts.d' + else + '/etc/facter/facts.d' + end + end + after :each do + shell("if [ -f #{facts_d}/fqdn.txt ] ; then rm #{facts_d}/fqdn.txt ; fi") + end + it 'fqdn_rotates floats' do + shell("echo 'fqdn=fakehost.localdomain' > #{facts_d}/fqdn.txt") + pp = <<-EOS + $a = ['a','b','c','d'] + $o = fqdn_rotate($a) + notice(inline_template('fqdn_rotate is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/fqdn_rotate is \["c", "d", "a", "b"\]/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-numbers' + end +end diff --git a/spec/acceptance/get_module_path_spec.rb b/spec/acceptance/get_module_path_spec.rb new file mode 100644 index 0000000..34d91fa --- /dev/null +++ b/spec/acceptance/get_module_path_spec.rb @@ -0,0 +1,41 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'get_module_path function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'get_module_paths stdlib' do + pp = <<-EOS + $a = $::is_pe ? { + 'true' => '/opt/puppet/share/puppet/modules/stdlib', + 'false' => '/etc/puppet/modules/stdlib', + } + $o = get_module_path('stdlib') + if $o == $a { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'get_module_paths dne' do + pp = <<-EOS + $a = $::is_pe ? { + 'true' => '/etc/puppetlabs/puppet/modules/dne', + 'false' => '/etc/puppet/modules/dne', + } + $o = get_module_path('dne') + if $o == $a { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :expect_failures => true) + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-numbers' + end +end diff --git a/spec/acceptance/getparam_spec.rb b/spec/acceptance/getparam_spec.rb new file mode 100755 index 0000000..a84b2d1 --- /dev/null +++ b/spec/acceptance/getparam_spec.rb @@ -0,0 +1,25 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'getparam function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'getparam a package' do + pp = <<-EOS + user { "rspec": + ensure => present, + managehome => true, + } + $o = getparam(User['rspec'], 'managehome') + notice(inline_template('getparam is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :expect_changes => true) do |r| + expect(r.stdout).to match(/getparam is true/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings' + end +end diff --git a/spec/acceptance/getvar_spec.rb b/spec/acceptance/getvar_spec.rb new file mode 100644 index 0000000..333c467 --- /dev/null +++ b/spec/acceptance/getvar_spec.rb @@ -0,0 +1,26 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'getvar function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'getvars from classes' do + pp = <<-EOS + class a::data { $foo = 'aoeu' } + include a::data + $b = 'aoeu' + $o = getvar("a::data::foo") + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-numbers' + end +end diff --git a/spec/acceptance/grep_spec.rb b/spec/acceptance/grep_spec.rb new file mode 100644 index 0000000..b39d48e --- /dev/null +++ b/spec/acceptance/grep_spec.rb @@ -0,0 +1,26 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'grep function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'greps arrays' do + pp = <<-EOS + $a = ['aaabbb','bbbccc','dddeee'] + $b = 'bbb' + $c = ['aaabbb','bbbccc'] + $o = grep($a,$b) + if $o == $c { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/spec/acceptance/has_interface_with_spec.rb b/spec/acceptance/has_interface_with_spec.rb new file mode 100644 index 0000000..41ae19f --- /dev/null +++ b/spec/acceptance/has_interface_with_spec.rb @@ -0,0 +1,44 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'has_interface_with function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'has_interface_with existing ipaddress' do + pp = <<-EOS + $a = '127.0.0.1' + $o = has_interface_with('ipaddress', $a) + notice(inline_template('has_interface_with is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/has_interface_with is true/) + end + end + it 'has_interface_with absent ipaddress' do + pp = <<-EOS + $a = '128.0.0.1' + $o = has_interface_with('ipaddress', $a) + notice(inline_template('has_interface_with is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/has_interface_with is false/) + end + end + it 'has_interface_with existing interface' do + pp = <<-EOS + $a = 'lo' + $o = has_interface_with($a) + notice(inline_template('has_interface_with is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/has_interface_with is true/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings' + end +end diff --git a/spec/acceptance/has_ip_address_spec.rb b/spec/acceptance/has_ip_address_spec.rb new file mode 100755 index 0000000..7d5fd87 --- /dev/null +++ b/spec/acceptance/has_ip_address_spec.rb @@ -0,0 +1,33 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'has_ip_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'has_ip_address existing ipaddress' do + pp = <<-EOS + $a = '127.0.0.1' + $o = has_ip_address($a) + notice(inline_template('has_ip_address is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/has_ip_address is true/) + end + end + it 'has_ip_address absent ipaddress' do + pp = <<-EOS + $a = '128.0.0.1' + $o = has_ip_address($a) + notice(inline_template('has_ip_address is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/has_ip_address is false/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings' + end +end diff --git a/spec/acceptance/has_ip_network_spec.rb b/spec/acceptance/has_ip_network_spec.rb new file mode 100755 index 0000000..692eaf9 --- /dev/null +++ b/spec/acceptance/has_ip_network_spec.rb @@ -0,0 +1,33 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'has_ip_network function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'has_ip_network existing ipaddress' do + pp = <<-EOS + $a = '127.0.0.0' + $o = has_ip_network($a) + notice(inline_template('has_ip_network is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/has_ip_network is true/) + end + end + it 'has_ip_network absent ipaddress' do + pp = <<-EOS + $a = '128.0.0.0' + $o = has_ip_network($a) + notice(inline_template('has_ip_network is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/has_ip_network is false/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings' + end +end diff --git a/spec/acceptance/has_key_spec.rb b/spec/acceptance/has_key_spec.rb new file mode 100644 index 0000000..c8557cb --- /dev/null +++ b/spec/acceptance/has_key_spec.rb @@ -0,0 +1,41 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'has_key function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'has_keys in hashes' do + pp = <<-EOS + $a = { 'aaa' => 'bbb','bbb' => 'ccc','ddd' => 'eee' } + $b = 'bbb' + $c = true + $o = has_key($a,$b) + if $o == $c { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'has_keys not in hashes' do + pp = <<-EOS + $a = { 'aaa' => 'bbb','bbb' => 'ccc','ddd' => 'eee' } + $b = 'ccc' + $c = false + $o = has_key($a,$b) + if $o == $c { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-hashes' + end +end diff --git a/spec/acceptance/hash_spec.rb b/spec/acceptance/hash_spec.rb new file mode 100644 index 0000000..ed53834 --- /dev/null +++ b/spec/acceptance/hash_spec.rb @@ -0,0 +1,26 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'hash function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'hashs arrays' do + pp = <<-EOS + $a = ['aaa','bbb','bbb','ccc','ddd','eee'] + $b = { 'aaa' => 'bbb', 'bbb' => 'ccc', 'ddd' => 'eee' } + $o = hash($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'handles odd-length arrays' + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/spec/acceptance/intersection_spec.rb b/spec/acceptance/intersection_spec.rb new file mode 100644 index 0000000..66b8652 --- /dev/null +++ b/spec/acceptance/intersection_spec.rb @@ -0,0 +1,27 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'intersection function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'intersections arrays' do + pp = <<-EOS + $a = ['aaa','bbb','ccc'] + $b = ['bbb','ccc','ddd','eee'] + $c = ['bbb','ccc'] + $o = intersection($a,$b) + if $o == $c { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'intersections empty arrays' + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/spec/acceptance/is_array_spec.rb b/spec/acceptance/is_array_spec.rb new file mode 100644 index 0000000..9c6bad7 --- /dev/null +++ b/spec/acceptance/is_array_spec.rb @@ -0,0 +1,67 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_array function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_arrays arrays' do + pp = <<-EOS + $a = ['aaa','bbb','ccc'] + $b = true + $o = is_array($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_arrays empty arrays' do + pp = <<-EOS + $a = [] + $b = true + $o = is_array($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_arrays strings' do + pp = <<-EOS + $a = "aoeu" + $b = false + $o = is_array($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_arrays hashes' do + pp = <<-EOS + $a = {'aaa'=>'bbb'} + $b = false + $o = is_array($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/spec/acceptance/is_bool_spec.rb b/spec/acceptance/is_bool_spec.rb new file mode 100644 index 0000000..60079f9 --- /dev/null +++ b/spec/acceptance/is_bool_spec.rb @@ -0,0 +1,81 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_bool function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_bools arrays' do + pp = <<-EOS + $a = ['aaa','bbb','ccc'] + $b = false + $o = is_bool($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_bools true' do + pp = <<-EOS + $a = true + $b = true + $o = is_bool($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_bools false' do + pp = <<-EOS + $a = false + $b = true + $o = is_bool($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_bools strings' do + pp = <<-EOS + $a = "true" + $b = false + $o = is_bool($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_bools hashes' do + pp = <<-EOS + $a = {'aaa'=>'bbb'} + $b = false + $o = is_bool($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/spec/acceptance/is_domain_name_spec.rb b/spec/acceptance/is_domain_name_spec.rb new file mode 100644 index 0000000..e0f03fa --- /dev/null +++ b/spec/acceptance/is_domain_name_spec.rb @@ -0,0 +1,83 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_domain_name function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_domain_names arrays' do + pp = <<-EOS + $a = ['aaa.com','bbb','ccc'] + $o = is_domain_name($a) + notice(inline_template('is_domain_name is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_domain_name is false/) + end + end + it 'is_domain_names true' do + pp = <<-EOS + $a = true + $o = is_domain_name($a) + notice(inline_template('is_domain_name is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_domain_name is false/) + end + end + it 'is_domain_names false' do + pp = <<-EOS + $a = false + $o = is_domain_name($a) + notice(inline_template('is_domain_name is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_domain_name is false/) + end + end + it 'is_domain_names strings with hyphens' do + pp = <<-EOS + $a = "3foo-bar.2bar-fuzz.com" + $b = true + $o = is_domain_name($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_domain_names strings beginning with hyphens' do + pp = <<-EOS + $a = "-bar.2bar-fuzz.com" + $b = false + $o = is_domain_name($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_domain_names hashes' do + pp = <<-EOS + $a = {'aaa'=>'www.com'} + $o = is_domain_name($a) + notice(inline_template('is_domain_name is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_domain_name is false/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/spec/acceptance/is_float_spec.rb b/spec/acceptance/is_float_spec.rb new file mode 100644 index 0000000..79b01f0 --- /dev/null +++ b/spec/acceptance/is_float_spec.rb @@ -0,0 +1,86 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_float function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_floats arrays' do + pp = <<-EOS + $a = ['aaa.com','bbb','ccc'] + $o = is_float($a) + notice(inline_template('is_floats is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_float is false/) + end + end + it 'is_floats true' do + pp = <<-EOS + $a = true + $o = is_float($a) + notice(inline_template('is_floats is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_float is false/) + end + end + it 'is_floats strings' do + pp = <<-EOS + $a = "3.5" + $b = true + $o = is_float($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_floats floats' do + pp = <<-EOS + $a = 3.5 + $b = true + $o = is_float($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_floats integers' do + pp = <<-EOS + $a = 3 + $b = false + $o = is_float($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_floats hashes' do + pp = <<-EOS + $a = {'aaa'=>'www.com'} + $o = is_float($a) + notice(inline_template('is_float is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_floats is false/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/spec/acceptance/is_function_available_spec.rb b/spec/acceptance/is_function_available_spec.rb new file mode 100644 index 0000000..2b5dd6d --- /dev/null +++ b/spec/acceptance/is_function_available_spec.rb @@ -0,0 +1,58 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_function_available function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_function_availables arrays' do + pp = <<-EOS + $a = ['fail','include','require'] + $o = is_function_available($a) + notice(inline_template('is_function_available is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_function_available is false/) + end + end + it 'is_function_availables true' do + pp = <<-EOS + $a = true + $o = is_function_available($a) + notice(inline_template('is_function_available is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_function_available is false/) + end + end + it 'is_function_availables strings' do + pp = <<-EOS + $a = "fail" + $b = true + $o = is_function_available($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_function_availables function_availables' do + pp = <<-EOS + $a = "is_function_available" + $o = is_function_available($a) + notice(inline_template('is_function_available is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_function_available is true/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/spec/acceptance/is_hash_spec.rb b/spec/acceptance/is_hash_spec.rb new file mode 100644 index 0000000..2ef310a --- /dev/null +++ b/spec/acceptance/is_hash_spec.rb @@ -0,0 +1,63 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_hash function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_hashs arrays' do + pp = <<-EOS + $a = ['aaa','bbb','ccc'] + $o = is_hash($a) + notice(inline_template('is_hash is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_hash is false/) + end + end + it 'is_hashs empty hashs' do + pp = <<-EOS + $a = {} + $b = true + $o = is_hash($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_hashs strings' do + pp = <<-EOS + $a = "aoeu" + $b = false + $o = is_hash($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_hashs hashes' do + pp = <<-EOS + $a = {'aaa'=>'bbb'} + $b = true + $o = is_hash($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + end +end diff --git a/spec/acceptance/is_integer_spec.rb b/spec/acceptance/is_integer_spec.rb new file mode 100644 index 0000000..bf6902b --- /dev/null +++ b/spec/acceptance/is_integer_spec.rb @@ -0,0 +1,95 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_integer function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_integers arrays' do + pp = <<-EOS + $a = ['aaa.com','bbb','ccc'] + $b = false + $o = is_integer($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_integers true' do + pp = <<-EOS + $a = true + $b = false + $o = is_integer($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_integers strings' do + pp = <<-EOS + $a = "3" + $b = true + $o = is_integer($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_integers floats' do + pp = <<-EOS + $a = 3.5 + $b = false + $o = is_integer($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_integers integers' do + pp = <<-EOS + $a = 3 + $b = true + $o = is_integer($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_integers hashes' do + pp = <<-EOS + $a = {'aaa'=>'www.com'} + $b = false + $o = is_integer($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/spec/acceptance/is_ip_address_spec.rb b/spec/acceptance/is_ip_address_spec.rb new file mode 100644 index 0000000..ed7a854 --- /dev/null +++ b/spec/acceptance/is_ip_address_spec.rb @@ -0,0 +1,80 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_ip_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_ip_addresss ipv4' do + pp = <<-EOS + $a = '1.2.3.4' + $b = true + $o = is_ip_address($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_ip_addresss ipv6' do + pp = <<-EOS + $a = "fe80:0000:cd12:d123:e2f8:47ff:fe09:dd74" + $b = true + $o = is_ip_address($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_ip_addresss ipv6 compressed' do + pp = <<-EOS + $a = "fe00::1" + $b = true + $o = is_ip_address($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_ip_addresss strings' do + pp = <<-EOS + $a = "aoeu" + $b = false + $o = is_ip_address($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_ip_addresss ipv4 out of range' do + pp = <<-EOS + $a = '1.2.3.400' + $b = false + $o = is_ip_address($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + end +end diff --git a/spec/acceptance/is_mac_address_spec.rb b/spec/acceptance/is_mac_address_spec.rb new file mode 100644 index 0000000..a2c892f --- /dev/null +++ b/spec/acceptance/is_mac_address_spec.rb @@ -0,0 +1,38 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_mac_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_mac_addresss a mac' do + pp = <<-EOS + $a = '00:a0:1f:12:7f:a0' + $b = true + $o = is_mac_address($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_mac_addresss a mac out of range' do + pp = <<-EOS + $a = '00:a0:1f:12:7f:g0' + $b = false + $o = is_mac_address($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + end +end diff --git a/spec/acceptance/is_numeric_spec.rb b/spec/acceptance/is_numeric_spec.rb new file mode 100644 index 0000000..21c8988 --- /dev/null +++ b/spec/acceptance/is_numeric_spec.rb @@ -0,0 +1,95 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_numeric function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_numerics arrays' do + pp = <<-EOS + $a = ['aaa.com','bbb','ccc'] + $b = false + $o = is_numeric($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_numerics true' do + pp = <<-EOS + $a = true + $b = false + $o = is_numeric($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_numerics strings' do + pp = <<-EOS + $a = "3" + $b = true + $o = is_numeric($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_numerics floats' do + pp = <<-EOS + $a = 3.5 + $b = true + $o = is_numeric($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_numerics integers' do + pp = <<-EOS + $a = 3 + $b = true + $o = is_numeric($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_numerics hashes' do + pp = <<-EOS + $a = {'aaa'=>'www.com'} + $b = false + $o = is_numeric($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/spec/acceptance/is_string_spec.rb b/spec/acceptance/is_string_spec.rb new file mode 100644 index 0000000..bda6cd7 --- /dev/null +++ b/spec/acceptance/is_string_spec.rb @@ -0,0 +1,102 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_string function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_strings arrays' do + pp = <<-EOS + $a = ['aaa.com','bbb','ccc'] + $b = false + $o = is_string($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_strings true' do + pp = <<-EOS + $a = true + $b = false + $o = is_string($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_strings strings' do + pp = <<-EOS + $a = "aoeu" + $o = is_string($a) + notice(inline_template('is_string is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_string is true/) + end + end + it 'is_strings number strings' do + pp = <<-EOS + $a = "3" + $o = is_string($a) + notice(inline_template('is_string is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_string is true/) + end + end + it 'is_strings floats' do + pp = <<-EOS + $a = 3.5 + $b = false + $o = is_string($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_strings integers' do + pp = <<-EOS + $a = 3 + $b = false + $o = is_string($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_strings hashes' do + pp = <<-EOS + $a = {'aaa'=>'www.com'} + $b = false + $o = is_string($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + end +end diff --git a/spec/acceptance/join_keys_to_values_spec.rb b/spec/acceptance/join_keys_to_values_spec.rb new file mode 100644 index 0000000..70493fd --- /dev/null +++ b/spec/acceptance/join_keys_to_values_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'join_keys_to_values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'join_keys_to_valuess hashes' do + pp = <<-EOS + $a = {'aaa'=>'bbb','ccc'=>'ddd'} + $b = ':' + $o = join_keys_to_values($a,$b) + notice(inline_template('join_keys_to_values is <%= @o.sort.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/join_keys_to_values is \["aaa:bbb", "ccc:ddd"\]/) + end + end + it 'handles non hashes' + it 'handles empty hashes' + end + describe 'failure' do + it 'handles improper argument counts' + end +end diff --git a/spec/acceptance/join_spec.rb b/spec/acceptance/join_spec.rb new file mode 100644 index 0000000..5397ce2 --- /dev/null +++ b/spec/acceptance/join_spec.rb @@ -0,0 +1,26 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'join function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'joins arrays' do + pp = <<-EOS + $a = ['aaa','bbb','ccc'] + $b = ':' + $c = 'aaa:bbb:ccc' + $o = join($a,$b) + if $o == $c { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'handles non arrays' + end + describe 'failure' do + it 'handles improper argument counts' + end +end diff --git a/spec/acceptance/keys_spec.rb b/spec/acceptance/keys_spec.rb new file mode 100644 index 0000000..176918e --- /dev/null +++ b/spec/acceptance/keys_spec.rb @@ -0,0 +1,23 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'keys function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'keyss hashes' do + pp = <<-EOS + $a = {'aaa'=>'bbb','ccc'=>'ddd'} + $o = keys($a) + notice(inline_template('keys is <%= @o.sort.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/keys is \["aaa", "ccc"\]/) + end + end + it 'handles non hashes' + it 'handles empty hashes' + end + describe 'failure' do + it 'handles improper argument counts' + end +end diff --git a/spec/acceptance/loadyaml_spec.rb b/spec/acceptance/loadyaml_spec.rb new file mode 100644 index 0000000..944a727 --- /dev/null +++ b/spec/acceptance/loadyaml_spec.rb @@ -0,0 +1,31 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'loadyaml function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'loadyamls array of values' do + shell('echo "--- + aaa: 1 + bbb: 2 + ccc: 3 + ddd: 4" > /testyaml.yaml') + pp = <<-EOS + $o = loadyaml('/testyaml.yaml') + notice(inline_template('loadyaml[aaa] is <%= @o["aaa"].inspect %>')) + notice(inline_template('loadyaml[bbb] is <%= @o["bbb"].inspect %>')) + notice(inline_template('loadyaml[ccc] is <%= @o["ccc"].inspect %>')) + notice(inline_template('loadyaml[ddd] is <%= @o["ddd"].inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/loadyaml\[aaa\] is 1/) + expect(r.stdout).to match(/loadyaml\[bbb\] is 2/) + expect(r.stdout).to match(/loadyaml\[ccc\] is 3/) + expect(r.stdout).to match(/loadyaml\[ddd\] is 4/) + end + end + end + describe 'failure' do + it 'fails with no arguments' + end +end diff --git a/spec/acceptance/lstrip_spec.rb b/spec/acceptance/lstrip_spec.rb new file mode 100644 index 0000000..3dc952f --- /dev/null +++ b/spec/acceptance/lstrip_spec.rb @@ -0,0 +1,34 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'lstrip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'lstrips arrays' do + pp = <<-EOS + $a = [" the "," public "," art","galleries "] + # Anagram: Large picture halls, I bet + $o = lstrip($a) + notice(inline_template('lstrip is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/lstrip is \["the ", "public ", "art", "galleries "\]/) + end + end + it 'lstrips strings' do + pp = <<-EOS + $a = " blowzy night-frumps vex'd jack q " + $o = lstrip($a) + notice(inline_template('lstrip is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/lstrip is "blowzy night-frumps vex'd jack q "/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings or arrays' + end +end diff --git a/spec/acceptance/max_spec.rb b/spec/acceptance/max_spec.rb new file mode 100644 index 0000000..f04e3d2 --- /dev/null +++ b/spec/acceptance/max_spec.rb @@ -0,0 +1,20 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'max function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'maxs arrays' do + pp = <<-EOS + $o = max("the","public","art","galleries") + notice(inline_template('max is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/max is "the"/) + end + end + end + describe 'failure' do + it 'handles no arguments' + end +end diff --git a/spec/acceptance/member_spec.rb b/spec/acceptance/member_spec.rb new file mode 100644 index 0000000..b467dbb --- /dev/null +++ b/spec/acceptance/member_spec.rb @@ -0,0 +1,26 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'member function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'members arrays' do + pp = <<-EOS + $a = ['aaa','bbb','ccc'] + $b = 'ccc' + $c = true + $o = member($a,$b) + if $o == $c { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'members arrays without members' + end + describe 'failure' do + it 'handles improper argument counts' + end +end diff --git a/spec/acceptance/merge_spec.rb b/spec/acceptance/merge_spec.rb new file mode 100644 index 0000000..a60e784 --- /dev/null +++ b/spec/acceptance/merge_spec.rb @@ -0,0 +1,23 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'merge function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'should merge two hashes' do + pp = <<-EOS + $a = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } } + $b = {'two' => 'dos', 'three' => { 'five' => 5 } } + $o = merge($a, $b) + notice(inline_template('merge[one] is <%= @o["one"].inspect %>')) + notice(inline_template('merge[two] is <%= @o["two"].inspect %>')) + notice(inline_template('merge[three] is <%= @o["three"].inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/merge\[one\] is "1"/) + expect(r.stdout).to match(/merge\[two\] is "dos"/) + expect(r.stdout).to match(/merge\[three\] is {"five"=>"5"}/) + end + end + end +end diff --git a/spec/acceptance/min_spec.rb b/spec/acceptance/min_spec.rb new file mode 100644 index 0000000..509092d --- /dev/null +++ b/spec/acceptance/min_spec.rb @@ -0,0 +1,20 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'min function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'mins arrays' do + pp = <<-EOS + $o = min("the","public","art","galleries") + notice(inline_template('min is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/min is "art"/) + end + end + end + describe 'failure' do + it 'handles no arguments' + end +end diff --git a/spec/acceptance/nodesets/centos-6-vcloud.yml b/spec/acceptance/nodesets/centos-6-vcloud.yml new file mode 100644 index 0000000..ca9c1d3 --- /dev/null +++ b/spec/acceptance/nodesets/centos-6-vcloud.yml @@ -0,0 +1,15 @@ +HOSTS: + 'centos-6-vcloud': + roles: + - master + platform: el-6-x86_64 + hypervisor: vcloud + template: centos-6-x86_64 +CONFIG: + type: foss + ssh: + keys: "~/.ssh/id_rsa-acceptance" + datastore: instance0 + folder: Delivery/Quality Assurance/Enterprise/Dynamic + resourcepool: delivery/Quality Assurance/Enterprise/Dynamic + pooling_api: http://vcloud.delivery.puppetlabs.net/ diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index f388729..8e56daa 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -4,14 +4,16 @@ require 'beaker-rspec' UNSUPPORTED_PLATFORMS = [] unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' + if hosts.first.is_pe? + install_pe + on hosts, 'mkdir -p /etc/puppetlabs/facter/facts.d' + else + install_puppet + on hosts, 'mkdir -p /etc/facter/facts.d' + on hosts, '/bin/touch /etc/puppet/hiera.yaml' + end hosts.each do |host| - # Install Puppet - if host.is_pe? - install_pe - else - install_puppet - on host, "mkdir -p #{host['distmoduledir']}" - end + on host, "mkdir -p #{host['distmoduledir']}" end end @@ -24,10 +26,6 @@ RSpec.configure do |c| # Configure all nodes in nodeset c.before :suite do - # Install module and dependencies puppet_module_install(:source => proj_root, :module_name => 'stdlib') - hosts.each do |host| - shell('/bin/touch /etc/puppet/hiera.yaml') - end end end -- cgit v1.2.3 From 78982c923812042046becad16a3c4d03b6cf3063 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Wed, 7 May 2014 10:09:21 -0700 Subject: Move the 4 misplaced tests --- spec/functions/defined_with_params_spec.rb | 37 ------- spec/functions/ensure_packages_spec.rb | 81 --------------- spec/functions/ensure_resource_spec.rb | 113 --------------------- spec/functions/getparam_spec.rb | 76 -------------- .../parser/functions/defined_with_params_spec.rb | 37 +++++++ .../parser/functions/ensure_packages_spec.rb | 81 +++++++++++++++ .../parser/functions/ensure_resource_spec.rb | 113 +++++++++++++++++++++ spec/unit/puppet/parser/functions/getparam_spec.rb | 76 ++++++++++++++ 8 files changed, 307 insertions(+), 307 deletions(-) delete mode 100644 spec/functions/defined_with_params_spec.rb delete mode 100644 spec/functions/ensure_packages_spec.rb delete mode 100644 spec/functions/ensure_resource_spec.rb delete mode 100644 spec/functions/getparam_spec.rb create mode 100644 spec/unit/puppet/parser/functions/defined_with_params_spec.rb create mode 100644 spec/unit/puppet/parser/functions/ensure_packages_spec.rb create mode 100644 spec/unit/puppet/parser/functions/ensure_resource_spec.rb create mode 100644 spec/unit/puppet/parser/functions/getparam_spec.rb diff --git a/spec/functions/defined_with_params_spec.rb b/spec/functions/defined_with_params_spec.rb deleted file mode 100644 index 28dbab3..0000000 --- a/spec/functions/defined_with_params_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -require 'rspec-puppet' -describe 'defined_with_params' do - describe 'when a resource is not specified' do - it { should run.with_params().and_raise_error(ArgumentError) } - end - describe 'when compared against a resource with no attributes' do - let :pre_condition do - 'user { "dan": }' - end - it do - should run.with_params('User[dan]', {}).and_return(true) - should run.with_params('User[bob]', {}).and_return(false) - should run.with_params('User[dan]', {'foo' => 'bar'}).and_return(false) - end - end - - describe 'when compared against a resource with attributes' do - let :pre_condition do - 'user { "dan": ensure => present, shell => "/bin/csh", managehome => false}' - end - it do - should run.with_params('User[dan]', {}).and_return(true) - should run.with_params('User[dan]', '').and_return(true) - should run.with_params('User[dan]', {'ensure' => 'present'} - ).and_return(true) - should run.with_params('User[dan]', - {'ensure' => 'present', 'managehome' => false} - ).and_return(true) - should run.with_params('User[dan]', - {'ensure' => 'absent', 'managehome' => false} - ).and_return(false) - end - end -end diff --git a/spec/functions/ensure_packages_spec.rb b/spec/functions/ensure_packages_spec.rb deleted file mode 100644 index 436be10..0000000 --- a/spec/functions/ensure_packages_spec.rb +++ /dev/null @@ -1,81 +0,0 @@ -#! /usr/bin/env ruby - -require 'spec_helper' -require 'rspec-puppet' -require 'puppet_spec/compiler' - -describe 'ensure_packages' do - include PuppetSpec::Compiler - - before :each do - Puppet::Parser::Functions.autoloader.loadall - Puppet::Parser::Functions.function(:ensure_packages) - Puppet::Parser::Functions.function(:ensure_resource) - Puppet::Parser::Functions.function(:defined_with_params) - Puppet::Parser::Functions.function(:create_resources) - end - - let :node do Puppet::Node.new('localhost') end - let :compiler do Puppet::Parser::Compiler.new(node) end - let :scope do - if Puppet.version.to_f >= 3.0 - Puppet::Parser::Scope.new(compiler) - else - newscope = Puppet::Parser::Scope.new - newscope.compiler = compiler - newscope.source = Puppet::Resource::Type.new(:node, :localhost) - newscope - end - end - - describe 'argument handling' do - it 'fails with no arguments' do - expect { - scope.function_ensure_packages([]) - }.to raise_error(Puppet::ParseError, /0 for 1 or 2/) - end - - it 'accepts an array of values' do - scope.function_ensure_packages([['foo']]) - end - - it 'accepts a single package name as a string' do - scope.function_ensure_packages(['foo']) - end - end - - context 'given a catalog with puppet package => absent' do - let :catalog do - compile_to_catalog(<<-EOS - ensure_packages(['facter']) - package { puppet: ensure => absent } - EOS - ) - end - - it 'has no effect on Package[puppet]' do - expect(catalog.resource(:package, 'puppet')['ensure']).to eq('absent') - end - end - - context 'given a clean catalog' do - let :catalog do - compile_to_catalog('ensure_packages(["facter"])') - end - - it 'declares package resources with ensure => present' do - expect(catalog.resource(:package, 'facter')['ensure']).to eq('present') - end - end - - context 'given a clean catalog and specified defaults' do - let :catalog do - compile_to_catalog('ensure_packages(["facter"], {"provider" => "gem"})') - end - - it 'declares package resources with ensure => present' do - expect(catalog.resource(:package, 'facter')['ensure']).to eq('present') - expect(catalog.resource(:package, 'facter')['provider']).to eq('gem') - end - end -end diff --git a/spec/functions/ensure_resource_spec.rb b/spec/functions/ensure_resource_spec.rb deleted file mode 100644 index 33bcac0..0000000 --- a/spec/functions/ensure_resource_spec.rb +++ /dev/null @@ -1,113 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' -require 'rspec-puppet' -require 'puppet_spec/compiler' - -describe 'ensure_resource' do - include PuppetSpec::Compiler - - before :all do - Puppet::Parser::Functions.autoloader.loadall - Puppet::Parser::Functions.function(:ensure_packages) - end - - let :node do Puppet::Node.new('localhost') end - let :compiler do Puppet::Parser::Compiler.new(node) end - let :scope do Puppet::Parser::Scope.new(compiler) end - - describe 'when a type or title is not specified' do - it { expect { scope.function_ensure_resource([]) }.to raise_error } - it { expect { scope.function_ensure_resource(['type']) }.to raise_error } - end - - describe 'when compared against a resource with no attributes' do - let :catalog do - compile_to_catalog(<<-EOS - user { "dan": } - ensure_resource('user', 'dan', {}) - EOS - ) - end - - it 'should contain the the ensured resources' do - expect(catalog.resource(:user, 'dan').to_s).to eq('User[dan]') - end - end - - describe 'works when compared against a resource with non-conflicting attributes' do - [ - "ensure_resource('User', 'dan', {})", - "ensure_resource('User', 'dan', '')", - "ensure_resource('User', 'dan', {'ensure' => 'present'})", - "ensure_resource('User', 'dan', {'ensure' => 'present', 'managehome' => false})" - ].each do |ensure_resource| - pp = <<-EOS - user { "dan": ensure => present, shell => "/bin/csh", managehome => false} - #{ensure_resource} - EOS - - it { expect { compile_to_catalog(pp) }.to_not raise_error } - end - end - - describe 'fails when compared against a resource with conflicting attributes' do - pp = <<-EOS - user { "dan": ensure => present, shell => "/bin/csh", managehome => false} - ensure_resource('User', 'dan', {'ensure' => 'absent', 'managehome' => false}) - EOS - - it { expect { compile_to_catalog(pp) }.to raise_error } - end - - describe 'when an array of new resources are passed in' do - let :catalog do - compile_to_catalog("ensure_resource('User', ['dan', 'alex'], {})") - end - - it 'should contain the ensured resources' do - expect(catalog.resource('User[dan]').to_s).to eq('User[dan]') - expect(catalog.resource('User[alex]').to_s).to eq('User[alex]') - end - end - - describe 'when an array of existing resources is compared against existing resources' do - pp = <<-EOS - user { 'dan': ensure => present; 'alex': ensure => present } - ensure_resource('User', ['dan', 'alex'], {}) - EOS - - let :catalog do - compile_to_catalog(pp) - end - - it 'should return the existing resources' do - expect(catalog.resource('User[dan]').to_s).to eq('User[dan]') - expect(catalog.resource('User[alex]').to_s).to eq('User[alex]') - end - end - - describe 'works when compared against existing resources with attributes' do - [ - "ensure_resource('User', ['dan', 'alex'], {})", - "ensure_resource('User', ['dan', 'alex'], '')", - "ensure_resource('User', ['dan', 'alex'], {'ensure' => 'present'})", - ].each do |ensure_resource| - pp = <<-EOS - user { 'dan': ensure => present; 'alex': ensure => present } - #{ensure_resource} - EOS - - it { expect { compile_to_catalog(pp) }.to_not raise_error } - end - end - - describe 'fails when compared against existing resources with conflicting attributes' do - pp = <<-EOS - user { 'dan': ensure => present; 'alex': ensure => present } - ensure_resource('User', ['dan', 'alex'], {'ensure' => 'absent'}) - EOS - - it { expect { compile_to_catalog(pp) }.to raise_error } - end - -end diff --git a/spec/functions/getparam_spec.rb b/spec/functions/getparam_spec.rb deleted file mode 100644 index bf024af..0000000 --- a/spec/functions/getparam_spec.rb +++ /dev/null @@ -1,76 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' -require 'rspec-puppet' -require 'puppet_spec/compiler' - -describe 'getparam' do - include PuppetSpec::Compiler - - before :each do - Puppet::Parser::Functions.autoloader.loadall - Puppet::Parser::Functions.function(:getparam) - end - - let :node do Puppet::Node.new('localhost') end - let :compiler do Puppet::Parser::Compiler.new(node) end - if Puppet.version.to_f >= 3.0 - let :scope do Puppet::Parser::Scope.new(compiler) end - else - let :scope do - newscope = Puppet::Parser::Scope.new - newscope.compiler = compiler - newscope.source = Puppet::Resource::Type.new(:node, :localhost) - newscope - end - end - - it "should exist" do - Puppet::Parser::Functions.function("getparam").should == "function_getparam" - end - - describe 'when a resource is not specified' do - it { expect { scope.function_getparam([]) }.to raise_error } - it { expect { scope.function_getparam(['User[dan]']) }.to raise_error } - it { expect { scope.function_getparam(['User[dan]']) }.to raise_error } - it { expect { scope.function_getparam(['User[dan]', {}]) }.to raise_error } - # This seems to be OK because we just check for a string. - it { expect { scope.function_getparam(['User[dan]', '']) }.to_not raise_error } - end - - describe 'when compared against a resource with no params' do - let :catalog do - compile_to_catalog(<<-EOS - user { "dan": } - EOS - ) - end - - it do - expect(scope.function_getparam(['User[dan]', 'shell'])).to eq('') - end - end - - describe 'when compared against a resource with params' do - let :catalog do - compile_to_catalog(<<-EOS - user { 'dan': ensure => present, shell => '/bin/sh', managehome => false} - $test = getparam(User[dan], 'shell') - EOS - ) - end - - it do - resource = Puppet::Parser::Resource.new(:user, 'dan', {:scope => scope}) - resource.set_parameter('ensure', 'present') - resource.set_parameter('shell', '/bin/sh') - resource.set_parameter('managehome', false) - compiler.add_resource(scope, resource) - - expect(scope.function_getparam(['User[dan]', 'shell'])).to eq('/bin/sh') - expect(scope.function_getparam(['User[dan]', ''])).to eq('') - expect(scope.function_getparam(['User[dan]', 'ensure'])).to eq('present') - # TODO: Expected this to be false, figure out why we're getting '' back. - expect(scope.function_getparam(['User[dan]', 'managehome'])).to eq('') - end - end -end diff --git a/spec/unit/puppet/parser/functions/defined_with_params_spec.rb b/spec/unit/puppet/parser/functions/defined_with_params_spec.rb new file mode 100644 index 0000000..28dbab3 --- /dev/null +++ b/spec/unit/puppet/parser/functions/defined_with_params_spec.rb @@ -0,0 +1,37 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +require 'rspec-puppet' +describe 'defined_with_params' do + describe 'when a resource is not specified' do + it { should run.with_params().and_raise_error(ArgumentError) } + end + describe 'when compared against a resource with no attributes' do + let :pre_condition do + 'user { "dan": }' + end + it do + should run.with_params('User[dan]', {}).and_return(true) + should run.with_params('User[bob]', {}).and_return(false) + should run.with_params('User[dan]', {'foo' => 'bar'}).and_return(false) + end + end + + describe 'when compared against a resource with attributes' do + let :pre_condition do + 'user { "dan": ensure => present, shell => "/bin/csh", managehome => false}' + end + it do + should run.with_params('User[dan]', {}).and_return(true) + should run.with_params('User[dan]', '').and_return(true) + should run.with_params('User[dan]', {'ensure' => 'present'} + ).and_return(true) + should run.with_params('User[dan]', + {'ensure' => 'present', 'managehome' => false} + ).and_return(true) + should run.with_params('User[dan]', + {'ensure' => 'absent', 'managehome' => false} + ).and_return(false) + end + end +end diff --git a/spec/unit/puppet/parser/functions/ensure_packages_spec.rb b/spec/unit/puppet/parser/functions/ensure_packages_spec.rb new file mode 100644 index 0000000..436be10 --- /dev/null +++ b/spec/unit/puppet/parser/functions/ensure_packages_spec.rb @@ -0,0 +1,81 @@ +#! /usr/bin/env ruby + +require 'spec_helper' +require 'rspec-puppet' +require 'puppet_spec/compiler' + +describe 'ensure_packages' do + include PuppetSpec::Compiler + + before :each do + Puppet::Parser::Functions.autoloader.loadall + Puppet::Parser::Functions.function(:ensure_packages) + Puppet::Parser::Functions.function(:ensure_resource) + Puppet::Parser::Functions.function(:defined_with_params) + Puppet::Parser::Functions.function(:create_resources) + end + + let :node do Puppet::Node.new('localhost') end + let :compiler do Puppet::Parser::Compiler.new(node) end + let :scope do + if Puppet.version.to_f >= 3.0 + Puppet::Parser::Scope.new(compiler) + else + newscope = Puppet::Parser::Scope.new + newscope.compiler = compiler + newscope.source = Puppet::Resource::Type.new(:node, :localhost) + newscope + end + end + + describe 'argument handling' do + it 'fails with no arguments' do + expect { + scope.function_ensure_packages([]) + }.to raise_error(Puppet::ParseError, /0 for 1 or 2/) + end + + it 'accepts an array of values' do + scope.function_ensure_packages([['foo']]) + end + + it 'accepts a single package name as a string' do + scope.function_ensure_packages(['foo']) + end + end + + context 'given a catalog with puppet package => absent' do + let :catalog do + compile_to_catalog(<<-EOS + ensure_packages(['facter']) + package { puppet: ensure => absent } + EOS + ) + end + + it 'has no effect on Package[puppet]' do + expect(catalog.resource(:package, 'puppet')['ensure']).to eq('absent') + end + end + + context 'given a clean catalog' do + let :catalog do + compile_to_catalog('ensure_packages(["facter"])') + end + + it 'declares package resources with ensure => present' do + expect(catalog.resource(:package, 'facter')['ensure']).to eq('present') + end + end + + context 'given a clean catalog and specified defaults' do + let :catalog do + compile_to_catalog('ensure_packages(["facter"], {"provider" => "gem"})') + end + + it 'declares package resources with ensure => present' do + expect(catalog.resource(:package, 'facter')['ensure']).to eq('present') + expect(catalog.resource(:package, 'facter')['provider']).to eq('gem') + end + end +end diff --git a/spec/unit/puppet/parser/functions/ensure_resource_spec.rb b/spec/unit/puppet/parser/functions/ensure_resource_spec.rb new file mode 100644 index 0000000..33bcac0 --- /dev/null +++ b/spec/unit/puppet/parser/functions/ensure_resource_spec.rb @@ -0,0 +1,113 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' +require 'rspec-puppet' +require 'puppet_spec/compiler' + +describe 'ensure_resource' do + include PuppetSpec::Compiler + + before :all do + Puppet::Parser::Functions.autoloader.loadall + Puppet::Parser::Functions.function(:ensure_packages) + end + + let :node do Puppet::Node.new('localhost') end + let :compiler do Puppet::Parser::Compiler.new(node) end + let :scope do Puppet::Parser::Scope.new(compiler) end + + describe 'when a type or title is not specified' do + it { expect { scope.function_ensure_resource([]) }.to raise_error } + it { expect { scope.function_ensure_resource(['type']) }.to raise_error } + end + + describe 'when compared against a resource with no attributes' do + let :catalog do + compile_to_catalog(<<-EOS + user { "dan": } + ensure_resource('user', 'dan', {}) + EOS + ) + end + + it 'should contain the the ensured resources' do + expect(catalog.resource(:user, 'dan').to_s).to eq('User[dan]') + end + end + + describe 'works when compared against a resource with non-conflicting attributes' do + [ + "ensure_resource('User', 'dan', {})", + "ensure_resource('User', 'dan', '')", + "ensure_resource('User', 'dan', {'ensure' => 'present'})", + "ensure_resource('User', 'dan', {'ensure' => 'present', 'managehome' => false})" + ].each do |ensure_resource| + pp = <<-EOS + user { "dan": ensure => present, shell => "/bin/csh", managehome => false} + #{ensure_resource} + EOS + + it { expect { compile_to_catalog(pp) }.to_not raise_error } + end + end + + describe 'fails when compared against a resource with conflicting attributes' do + pp = <<-EOS + user { "dan": ensure => present, shell => "/bin/csh", managehome => false} + ensure_resource('User', 'dan', {'ensure' => 'absent', 'managehome' => false}) + EOS + + it { expect { compile_to_catalog(pp) }.to raise_error } + end + + describe 'when an array of new resources are passed in' do + let :catalog do + compile_to_catalog("ensure_resource('User', ['dan', 'alex'], {})") + end + + it 'should contain the ensured resources' do + expect(catalog.resource('User[dan]').to_s).to eq('User[dan]') + expect(catalog.resource('User[alex]').to_s).to eq('User[alex]') + end + end + + describe 'when an array of existing resources is compared against existing resources' do + pp = <<-EOS + user { 'dan': ensure => present; 'alex': ensure => present } + ensure_resource('User', ['dan', 'alex'], {}) + EOS + + let :catalog do + compile_to_catalog(pp) + end + + it 'should return the existing resources' do + expect(catalog.resource('User[dan]').to_s).to eq('User[dan]') + expect(catalog.resource('User[alex]').to_s).to eq('User[alex]') + end + end + + describe 'works when compared against existing resources with attributes' do + [ + "ensure_resource('User', ['dan', 'alex'], {})", + "ensure_resource('User', ['dan', 'alex'], '')", + "ensure_resource('User', ['dan', 'alex'], {'ensure' => 'present'})", + ].each do |ensure_resource| + pp = <<-EOS + user { 'dan': ensure => present; 'alex': ensure => present } + #{ensure_resource} + EOS + + it { expect { compile_to_catalog(pp) }.to_not raise_error } + end + end + + describe 'fails when compared against existing resources with conflicting attributes' do + pp = <<-EOS + user { 'dan': ensure => present; 'alex': ensure => present } + ensure_resource('User', ['dan', 'alex'], {'ensure' => 'absent'}) + EOS + + it { expect { compile_to_catalog(pp) }.to raise_error } + end + +end diff --git a/spec/unit/puppet/parser/functions/getparam_spec.rb b/spec/unit/puppet/parser/functions/getparam_spec.rb new file mode 100644 index 0000000..bf024af --- /dev/null +++ b/spec/unit/puppet/parser/functions/getparam_spec.rb @@ -0,0 +1,76 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' +require 'rspec-puppet' +require 'puppet_spec/compiler' + +describe 'getparam' do + include PuppetSpec::Compiler + + before :each do + Puppet::Parser::Functions.autoloader.loadall + Puppet::Parser::Functions.function(:getparam) + end + + let :node do Puppet::Node.new('localhost') end + let :compiler do Puppet::Parser::Compiler.new(node) end + if Puppet.version.to_f >= 3.0 + let :scope do Puppet::Parser::Scope.new(compiler) end + else + let :scope do + newscope = Puppet::Parser::Scope.new + newscope.compiler = compiler + newscope.source = Puppet::Resource::Type.new(:node, :localhost) + newscope + end + end + + it "should exist" do + Puppet::Parser::Functions.function("getparam").should == "function_getparam" + end + + describe 'when a resource is not specified' do + it { expect { scope.function_getparam([]) }.to raise_error } + it { expect { scope.function_getparam(['User[dan]']) }.to raise_error } + it { expect { scope.function_getparam(['User[dan]']) }.to raise_error } + it { expect { scope.function_getparam(['User[dan]', {}]) }.to raise_error } + # This seems to be OK because we just check for a string. + it { expect { scope.function_getparam(['User[dan]', '']) }.to_not raise_error } + end + + describe 'when compared against a resource with no params' do + let :catalog do + compile_to_catalog(<<-EOS + user { "dan": } + EOS + ) + end + + it do + expect(scope.function_getparam(['User[dan]', 'shell'])).to eq('') + end + end + + describe 'when compared against a resource with params' do + let :catalog do + compile_to_catalog(<<-EOS + user { 'dan': ensure => present, shell => '/bin/sh', managehome => false} + $test = getparam(User[dan], 'shell') + EOS + ) + end + + it do + resource = Puppet::Parser::Resource.new(:user, 'dan', {:scope => scope}) + resource.set_parameter('ensure', 'present') + resource.set_parameter('shell', '/bin/sh') + resource.set_parameter('managehome', false) + compiler.add_resource(scope, resource) + + expect(scope.function_getparam(['User[dan]', 'shell'])).to eq('/bin/sh') + expect(scope.function_getparam(['User[dan]', ''])).to eq('') + expect(scope.function_getparam(['User[dan]', 'ensure'])).to eq('present') + # TODO: Expected this to be false, figure out why we're getting '' back. + expect(scope.function_getparam(['User[dan]', 'managehome'])).to eq('') + end + end +end -- cgit v1.2.3 From c66a2e4f49d6c9ebcbff718f3ec119049fb4c514 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Wed, 7 May 2014 10:09:32 -0700 Subject: Add mode +x to spec .rb files --- spec/acceptance/abs_spec.rb | 0 spec/acceptance/any2array_spec.rb | 0 spec/acceptance/base64_spec.rb | 0 spec/acceptance/bool2num_spec.rb | 0 spec/acceptance/build_csv.rb | 0 spec/acceptance/capitalize_spec.rb | 0 spec/acceptance/chomp_spec.rb | 0 spec/acceptance/chop_spec.rb | 0 spec/acceptance/concat_spec.rb | 0 spec/acceptance/count_spec.rb | 0 spec/acceptance/deep_merge_spec.rb | 0 spec/acceptance/defined_with_params_spec.rb | 0 spec/acceptance/delete_at_spec.rb | 0 spec/acceptance/delete_spec.rb | 0 spec/acceptance/delete_undef_values_spec.rb | 0 spec/acceptance/delete_values_spec.rb | 0 spec/acceptance/difference_spec.rb | 0 spec/acceptance/dirname_spec.rb | 0 spec/acceptance/downcase_spec.rb | 0 spec/acceptance/empty_spec.rb | 0 spec/acceptance/ensure_packages_spec.rb | 0 spec/acceptance/flatten_spec.rb | 0 spec/acceptance/floor_spec.rb | 0 spec/acceptance/fqdn_rotate_spec.rb | 0 spec/acceptance/get_module_path_spec.rb | 0 spec/acceptance/getvar_spec.rb | 0 spec/acceptance/grep_spec.rb | 0 spec/acceptance/has_interface_with_spec.rb | 0 spec/acceptance/has_key_spec.rb | 0 spec/acceptance/hash_spec.rb | 0 spec/acceptance/intersection_spec.rb | 0 spec/acceptance/is_array_spec.rb | 0 spec/acceptance/is_bool_spec.rb | 0 spec/acceptance/is_domain_name_spec.rb | 0 spec/acceptance/is_float_spec.rb | 0 spec/acceptance/is_function_available_spec.rb | 0 spec/acceptance/is_hash_spec.rb | 0 spec/acceptance/is_integer_spec.rb | 0 spec/acceptance/is_ip_address_spec.rb | 0 spec/acceptance/is_mac_address_spec.rb | 0 spec/acceptance/is_numeric_spec.rb | 0 spec/acceptance/is_string_spec.rb | 0 spec/acceptance/join_keys_to_values_spec.rb | 0 spec/acceptance/join_spec.rb | 0 spec/acceptance/keys_spec.rb | 0 spec/acceptance/lstrip_spec.rb | 0 spec/acceptance/max_spec.rb | 0 spec/acceptance/member_spec.rb | 0 spec/acceptance/merge_spec.rb | 0 spec/acceptance/min_spec.rb | 0 spec/acceptance/num2bool_spec.rb | 0 spec/acceptance/parsejson_spec.rb | 0 spec/acceptance/parseyaml_spec.rb | 0 spec/acceptance/pick_default_spec.rb | 0 spec/acceptance/pick_spec.rb | 0 spec/acceptance/prefix_spec.rb | 0 spec/acceptance/range_spec.rb | 0 spec/acceptance/reject_spec.rb | 0 spec/acceptance/reverse_spec.rb | 0 spec/acceptance/rstrip_spec.rb | 0 spec/acceptance/shuffle_spec.rb | 0 spec/acceptance/size_spec.rb | 0 spec/acceptance/sort_spec.rb | 0 spec/acceptance/squeeze_spec.rb | 0 spec/acceptance/str2bool_spec.rb | 0 spec/acceptance/str2saltedsha512_spec.rb | 0 spec/acceptance/strftime_spec.rb | 0 spec/acceptance/strip_spec.rb | 0 spec/acceptance/suffix_spec.rb | 0 spec/acceptance/swapcase_spec.rb | 0 spec/acceptance/time_spec.rb | 0 spec/acceptance/to_bytes_spec.rb | 0 spec/acceptance/type_spec.rb | 0 spec/acceptance/union_spec.rb | 0 spec/acceptance/unique_spec.rb | 0 spec/acceptance/unsupported_spec.rb | 0 spec/acceptance/upcase_spec.rb | 0 spec/acceptance/uriescape_spec.rb | 0 spec/acceptance/validate_absolute_path_spec.rb | 0 spec/acceptance/validate_array_spec.rb | 0 spec/acceptance/validate_augeas_spec.rb | 0 spec/acceptance/validate_bool_spec.rb | 0 spec/acceptance/validate_cmd_spec.rb | 0 spec/acceptance/validate_hash_spec.rb | 0 spec/acceptance/validate_ipv4_address_spec.rb | 0 spec/acceptance/validate_ipv6_address_spec.rb | 0 spec/acceptance/validate_re_spec.rb | 0 spec/acceptance/validate_slength_spec.rb | 0 spec/acceptance/validate_string_spec.rb | 0 spec/acceptance/values_at_spec.rb | 0 spec/acceptance/values_spec.rb | 0 spec/acceptance/zip_spec.rb | 0 spec/classes/anchor_spec.rb | 0 spec/lib/puppet_spec/compiler.rb | 0 spec/lib/puppet_spec/database.rb | 0 spec/lib/puppet_spec/matchers.rb | 0 spec/lib/puppet_spec/modules.rb | 0 spec/lib/puppet_spec/pops.rb | 0 spec/lib/puppet_spec/scope.rb | 0 spec/lib/puppet_spec/settings.rb | 0 spec/spec_helper.rb | 0 spec/spec_helper_acceptance.rb | 0 spec/unit/facter/facter_dot_d_spec.rb | 0 spec/unit/facter/pe_version_spec.rb | 0 spec/unit/facter/root_home_spec.rb | 0 spec/unit/facter/util/puppet_settings_spec.rb | 0 spec/unit/puppet/parser/functions/any2array_spec.rb | 0 spec/unit/puppet/parser/functions/concat_spec.rb | 0 spec/unit/puppet/parser/functions/count_spec.rb | 0 spec/unit/puppet/parser/functions/deep_merge_spec.rb | 0 spec/unit/puppet/parser/functions/defined_with_params_spec.rb | 0 spec/unit/puppet/parser/functions/delete_undef_values_spec.rb | 0 spec/unit/puppet/parser/functions/delete_values_spec.rb | 0 spec/unit/puppet/parser/functions/difference_spec.rb | 0 spec/unit/puppet/parser/functions/ensure_packages_spec.rb | 0 spec/unit/puppet/parser/functions/ensure_resource_spec.rb | 0 spec/unit/puppet/parser/functions/floor_spec.rb | 0 spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb | 0 spec/unit/puppet/parser/functions/get_module_path_spec.rb | 0 spec/unit/puppet/parser/functions/getparam_spec.rb | 0 spec/unit/puppet/parser/functions/getvar_spec.rb | 0 spec/unit/puppet/parser/functions/has_key_spec.rb | 0 spec/unit/puppet/parser/functions/hash_spec.rb | 0 spec/unit/puppet/parser/functions/intersection_spec.rb | 0 spec/unit/puppet/parser/functions/is_array_spec.rb | 0 spec/unit/puppet/parser/functions/is_bool_spec.rb | 0 spec/unit/puppet/parser/functions/is_domain_name_spec.rb | 0 spec/unit/puppet/parser/functions/is_float_spec.rb | 0 spec/unit/puppet/parser/functions/is_function_available.rb | 0 spec/unit/puppet/parser/functions/is_hash_spec.rb | 0 spec/unit/puppet/parser/functions/is_integer_spec.rb | 0 spec/unit/puppet/parser/functions/is_ip_address_spec.rb | 0 spec/unit/puppet/parser/functions/is_mac_address_spec.rb | 0 spec/unit/puppet/parser/functions/is_numeric_spec.rb | 0 spec/unit/puppet/parser/functions/is_string_spec.rb | 0 spec/unit/puppet/parser/functions/join_keys_to_values_spec.rb | 0 spec/unit/puppet/parser/functions/join_spec.rb | 0 spec/unit/puppet/parser/functions/keys_spec.rb | 0 spec/unit/puppet/parser/functions/loadyaml_spec.rb | 0 spec/unit/puppet/parser/functions/lstrip_spec.rb | 0 spec/unit/puppet/parser/functions/member_spec.rb | 0 spec/unit/puppet/parser/functions/merge_spec.rb | 0 spec/unit/puppet/parser/functions/num2bool_spec.rb | 0 spec/unit/puppet/parser/functions/parsejson_spec.rb | 0 spec/unit/puppet/parser/functions/parseyaml_spec.rb | 0 spec/unit/puppet/parser/functions/pick_default_spec.rb | 0 spec/unit/puppet/parser/functions/prefix_spec.rb | 0 spec/unit/puppet/parser/functions/range_spec.rb | 0 spec/unit/puppet/parser/functions/reverse_spec.rb | 0 spec/unit/puppet/parser/functions/rstrip_spec.rb | 0 spec/unit/puppet/parser/functions/shuffle_spec.rb | 0 spec/unit/puppet/parser/functions/size_spec.rb | 0 spec/unit/puppet/parser/functions/sort_spec.rb | 0 spec/unit/puppet/parser/functions/squeeze_spec.rb | 0 spec/unit/puppet/parser/functions/str2bool_spec.rb | 0 spec/unit/puppet/parser/functions/str2saltedsha512_spec.rb | 0 spec/unit/puppet/parser/functions/strftime_spec.rb | 0 spec/unit/puppet/parser/functions/strip_spec.rb | 0 spec/unit/puppet/parser/functions/suffix_spec.rb | 0 spec/unit/puppet/parser/functions/swapcase_spec.rb | 0 spec/unit/puppet/parser/functions/time_spec.rb | 0 spec/unit/puppet/parser/functions/type_spec.rb | 0 spec/unit/puppet/parser/functions/union_spec.rb | 0 spec/unit/puppet/parser/functions/unique_spec.rb | 0 spec/unit/puppet/parser/functions/upcase_spec.rb | 0 spec/unit/puppet/parser/functions/uriescape_spec.rb | 0 spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb | 0 spec/unit/puppet/parser/functions/validate_array_spec.rb | 0 spec/unit/puppet/parser/functions/validate_augeas_spec.rb | 0 spec/unit/puppet/parser/functions/validate_bool_spec.rb | 0 spec/unit/puppet/parser/functions/validate_cmd_spec.rb | 0 spec/unit/puppet/parser/functions/validate_hash_spec.rb | 0 spec/unit/puppet/parser/functions/validate_ipv4_address_spec.rb | 0 spec/unit/puppet/parser/functions/validate_ipv6_address_spec.rb | 0 spec/unit/puppet/parser/functions/validate_re_spec.rb | 0 spec/unit/puppet/parser/functions/validate_string_spec.rb | 0 spec/unit/puppet/parser/functions/values_at_spec.rb | 0 spec/unit/puppet/parser/functions/values_spec.rb | 0 spec/unit/puppet/parser/functions/zip_spec.rb | 0 spec/unit/puppet/provider/file_line/ruby_spec.rb | 0 spec/unit/puppet/type/anchor_spec.rb | 0 spec/unit/puppet/type/file_line_spec.rb | 0 182 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 spec/acceptance/abs_spec.rb mode change 100644 => 100755 spec/acceptance/any2array_spec.rb mode change 100644 => 100755 spec/acceptance/base64_spec.rb mode change 100644 => 100755 spec/acceptance/bool2num_spec.rb mode change 100644 => 100755 spec/acceptance/build_csv.rb mode change 100644 => 100755 spec/acceptance/capitalize_spec.rb mode change 100644 => 100755 spec/acceptance/chomp_spec.rb mode change 100644 => 100755 spec/acceptance/chop_spec.rb mode change 100644 => 100755 spec/acceptance/concat_spec.rb mode change 100644 => 100755 spec/acceptance/count_spec.rb mode change 100644 => 100755 spec/acceptance/deep_merge_spec.rb mode change 100644 => 100755 spec/acceptance/defined_with_params_spec.rb mode change 100644 => 100755 spec/acceptance/delete_at_spec.rb mode change 100644 => 100755 spec/acceptance/delete_spec.rb mode change 100644 => 100755 spec/acceptance/delete_undef_values_spec.rb mode change 100644 => 100755 spec/acceptance/delete_values_spec.rb mode change 100644 => 100755 spec/acceptance/difference_spec.rb mode change 100644 => 100755 spec/acceptance/dirname_spec.rb mode change 100644 => 100755 spec/acceptance/downcase_spec.rb mode change 100644 => 100755 spec/acceptance/empty_spec.rb mode change 100644 => 100755 spec/acceptance/ensure_packages_spec.rb mode change 100644 => 100755 spec/acceptance/flatten_spec.rb mode change 100644 => 100755 spec/acceptance/floor_spec.rb mode change 100644 => 100755 spec/acceptance/fqdn_rotate_spec.rb mode change 100644 => 100755 spec/acceptance/get_module_path_spec.rb mode change 100644 => 100755 spec/acceptance/getvar_spec.rb mode change 100644 => 100755 spec/acceptance/grep_spec.rb mode change 100644 => 100755 spec/acceptance/has_interface_with_spec.rb mode change 100644 => 100755 spec/acceptance/has_key_spec.rb mode change 100644 => 100755 spec/acceptance/hash_spec.rb mode change 100644 => 100755 spec/acceptance/intersection_spec.rb mode change 100644 => 100755 spec/acceptance/is_array_spec.rb mode change 100644 => 100755 spec/acceptance/is_bool_spec.rb mode change 100644 => 100755 spec/acceptance/is_domain_name_spec.rb mode change 100644 => 100755 spec/acceptance/is_float_spec.rb mode change 100644 => 100755 spec/acceptance/is_function_available_spec.rb mode change 100644 => 100755 spec/acceptance/is_hash_spec.rb mode change 100644 => 100755 spec/acceptance/is_integer_spec.rb mode change 100644 => 100755 spec/acceptance/is_ip_address_spec.rb mode change 100644 => 100755 spec/acceptance/is_mac_address_spec.rb mode change 100644 => 100755 spec/acceptance/is_numeric_spec.rb mode change 100644 => 100755 spec/acceptance/is_string_spec.rb mode change 100644 => 100755 spec/acceptance/join_keys_to_values_spec.rb mode change 100644 => 100755 spec/acceptance/join_spec.rb mode change 100644 => 100755 spec/acceptance/keys_spec.rb mode change 100644 => 100755 spec/acceptance/lstrip_spec.rb mode change 100644 => 100755 spec/acceptance/max_spec.rb mode change 100644 => 100755 spec/acceptance/member_spec.rb mode change 100644 => 100755 spec/acceptance/merge_spec.rb mode change 100644 => 100755 spec/acceptance/min_spec.rb mode change 100644 => 100755 spec/acceptance/num2bool_spec.rb mode change 100644 => 100755 spec/acceptance/parsejson_spec.rb mode change 100644 => 100755 spec/acceptance/parseyaml_spec.rb mode change 100644 => 100755 spec/acceptance/pick_default_spec.rb mode change 100644 => 100755 spec/acceptance/pick_spec.rb mode change 100644 => 100755 spec/acceptance/prefix_spec.rb mode change 100644 => 100755 spec/acceptance/range_spec.rb mode change 100644 => 100755 spec/acceptance/reject_spec.rb mode change 100644 => 100755 spec/acceptance/reverse_spec.rb mode change 100644 => 100755 spec/acceptance/rstrip_spec.rb mode change 100644 => 100755 spec/acceptance/shuffle_spec.rb mode change 100644 => 100755 spec/acceptance/size_spec.rb mode change 100644 => 100755 spec/acceptance/sort_spec.rb mode change 100644 => 100755 spec/acceptance/squeeze_spec.rb mode change 100644 => 100755 spec/acceptance/str2bool_spec.rb mode change 100644 => 100755 spec/acceptance/str2saltedsha512_spec.rb mode change 100644 => 100755 spec/acceptance/strftime_spec.rb mode change 100644 => 100755 spec/acceptance/strip_spec.rb mode change 100644 => 100755 spec/acceptance/suffix_spec.rb mode change 100644 => 100755 spec/acceptance/swapcase_spec.rb mode change 100644 => 100755 spec/acceptance/time_spec.rb mode change 100644 => 100755 spec/acceptance/to_bytes_spec.rb mode change 100644 => 100755 spec/acceptance/type_spec.rb mode change 100644 => 100755 spec/acceptance/union_spec.rb mode change 100644 => 100755 spec/acceptance/unique_spec.rb mode change 100644 => 100755 spec/acceptance/unsupported_spec.rb mode change 100644 => 100755 spec/acceptance/upcase_spec.rb mode change 100644 => 100755 spec/acceptance/uriescape_spec.rb mode change 100644 => 100755 spec/acceptance/validate_absolute_path_spec.rb mode change 100644 => 100755 spec/acceptance/validate_array_spec.rb mode change 100644 => 100755 spec/acceptance/validate_augeas_spec.rb mode change 100644 => 100755 spec/acceptance/validate_bool_spec.rb mode change 100644 => 100755 spec/acceptance/validate_cmd_spec.rb mode change 100644 => 100755 spec/acceptance/validate_hash_spec.rb mode change 100644 => 100755 spec/acceptance/validate_ipv4_address_spec.rb mode change 100644 => 100755 spec/acceptance/validate_ipv6_address_spec.rb mode change 100644 => 100755 spec/acceptance/validate_re_spec.rb mode change 100644 => 100755 spec/acceptance/validate_slength_spec.rb mode change 100644 => 100755 spec/acceptance/validate_string_spec.rb mode change 100644 => 100755 spec/acceptance/values_at_spec.rb mode change 100644 => 100755 spec/acceptance/values_spec.rb mode change 100644 => 100755 spec/acceptance/zip_spec.rb mode change 100644 => 100755 spec/classes/anchor_spec.rb mode change 100644 => 100755 spec/lib/puppet_spec/compiler.rb mode change 100644 => 100755 spec/lib/puppet_spec/database.rb mode change 100644 => 100755 spec/lib/puppet_spec/matchers.rb mode change 100644 => 100755 spec/lib/puppet_spec/modules.rb mode change 100644 => 100755 spec/lib/puppet_spec/pops.rb mode change 100644 => 100755 spec/lib/puppet_spec/scope.rb mode change 100644 => 100755 spec/lib/puppet_spec/settings.rb mode change 100644 => 100755 spec/spec_helper.rb mode change 100644 => 100755 spec/spec_helper_acceptance.rb mode change 100644 => 100755 spec/unit/facter/facter_dot_d_spec.rb mode change 100644 => 100755 spec/unit/facter/pe_version_spec.rb mode change 100644 => 100755 spec/unit/facter/root_home_spec.rb mode change 100644 => 100755 spec/unit/facter/util/puppet_settings_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/any2array_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/concat_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/count_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/deep_merge_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/defined_with_params_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/delete_undef_values_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/delete_values_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/difference_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/ensure_packages_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/ensure_resource_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/floor_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/get_module_path_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/getparam_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/getvar_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/has_key_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/hash_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/intersection_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/is_array_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/is_bool_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/is_domain_name_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/is_float_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/is_function_available.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/is_hash_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/is_integer_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/is_ip_address_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/is_mac_address_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/is_numeric_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/is_string_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/join_keys_to_values_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/join_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/keys_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/loadyaml_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/lstrip_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/member_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/merge_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/num2bool_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/parsejson_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/parseyaml_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/pick_default_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/prefix_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/range_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/reverse_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/rstrip_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/shuffle_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/size_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/sort_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/squeeze_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/str2bool_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/str2saltedsha512_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/strftime_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/strip_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/suffix_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/swapcase_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/time_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/type_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/union_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/unique_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/upcase_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/uriescape_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/validate_array_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/validate_augeas_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/validate_bool_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/validate_cmd_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/validate_hash_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/validate_ipv4_address_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/validate_ipv6_address_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/validate_re_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/validate_string_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/values_at_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/values_spec.rb mode change 100644 => 100755 spec/unit/puppet/parser/functions/zip_spec.rb mode change 100644 => 100755 spec/unit/puppet/provider/file_line/ruby_spec.rb mode change 100644 => 100755 spec/unit/puppet/type/anchor_spec.rb mode change 100644 => 100755 spec/unit/puppet/type/file_line_spec.rb diff --git a/spec/acceptance/abs_spec.rb b/spec/acceptance/abs_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/any2array_spec.rb b/spec/acceptance/any2array_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/base64_spec.rb b/spec/acceptance/base64_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/bool2num_spec.rb b/spec/acceptance/bool2num_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/build_csv.rb b/spec/acceptance/build_csv.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/capitalize_spec.rb b/spec/acceptance/capitalize_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/chomp_spec.rb b/spec/acceptance/chomp_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/chop_spec.rb b/spec/acceptance/chop_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/concat_spec.rb b/spec/acceptance/concat_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/count_spec.rb b/spec/acceptance/count_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/deep_merge_spec.rb b/spec/acceptance/deep_merge_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/defined_with_params_spec.rb b/spec/acceptance/defined_with_params_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/delete_at_spec.rb b/spec/acceptance/delete_at_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/delete_spec.rb b/spec/acceptance/delete_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/delete_undef_values_spec.rb b/spec/acceptance/delete_undef_values_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/delete_values_spec.rb b/spec/acceptance/delete_values_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/difference_spec.rb b/spec/acceptance/difference_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/dirname_spec.rb b/spec/acceptance/dirname_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/downcase_spec.rb b/spec/acceptance/downcase_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/empty_spec.rb b/spec/acceptance/empty_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/ensure_packages_spec.rb b/spec/acceptance/ensure_packages_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/flatten_spec.rb b/spec/acceptance/flatten_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/floor_spec.rb b/spec/acceptance/floor_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/fqdn_rotate_spec.rb b/spec/acceptance/fqdn_rotate_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/get_module_path_spec.rb b/spec/acceptance/get_module_path_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/getvar_spec.rb b/spec/acceptance/getvar_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/grep_spec.rb b/spec/acceptance/grep_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/has_interface_with_spec.rb b/spec/acceptance/has_interface_with_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/has_key_spec.rb b/spec/acceptance/has_key_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/hash_spec.rb b/spec/acceptance/hash_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/intersection_spec.rb b/spec/acceptance/intersection_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/is_array_spec.rb b/spec/acceptance/is_array_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/is_bool_spec.rb b/spec/acceptance/is_bool_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/is_domain_name_spec.rb b/spec/acceptance/is_domain_name_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/is_float_spec.rb b/spec/acceptance/is_float_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/is_function_available_spec.rb b/spec/acceptance/is_function_available_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/is_hash_spec.rb b/spec/acceptance/is_hash_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/is_integer_spec.rb b/spec/acceptance/is_integer_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/is_ip_address_spec.rb b/spec/acceptance/is_ip_address_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/is_mac_address_spec.rb b/spec/acceptance/is_mac_address_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/is_numeric_spec.rb b/spec/acceptance/is_numeric_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/is_string_spec.rb b/spec/acceptance/is_string_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/join_keys_to_values_spec.rb b/spec/acceptance/join_keys_to_values_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/join_spec.rb b/spec/acceptance/join_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/keys_spec.rb b/spec/acceptance/keys_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/lstrip_spec.rb b/spec/acceptance/lstrip_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/max_spec.rb b/spec/acceptance/max_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/member_spec.rb b/spec/acceptance/member_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/merge_spec.rb b/spec/acceptance/merge_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/min_spec.rb b/spec/acceptance/min_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/num2bool_spec.rb b/spec/acceptance/num2bool_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/parsejson_spec.rb b/spec/acceptance/parsejson_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/parseyaml_spec.rb b/spec/acceptance/parseyaml_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/pick_default_spec.rb b/spec/acceptance/pick_default_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/pick_spec.rb b/spec/acceptance/pick_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/prefix_spec.rb b/spec/acceptance/prefix_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/range_spec.rb b/spec/acceptance/range_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/reject_spec.rb b/spec/acceptance/reject_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/reverse_spec.rb b/spec/acceptance/reverse_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/rstrip_spec.rb b/spec/acceptance/rstrip_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/shuffle_spec.rb b/spec/acceptance/shuffle_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/size_spec.rb b/spec/acceptance/size_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/sort_spec.rb b/spec/acceptance/sort_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/squeeze_spec.rb b/spec/acceptance/squeeze_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/str2bool_spec.rb b/spec/acceptance/str2bool_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/str2saltedsha512_spec.rb b/spec/acceptance/str2saltedsha512_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/strftime_spec.rb b/spec/acceptance/strftime_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/strip_spec.rb b/spec/acceptance/strip_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/suffix_spec.rb b/spec/acceptance/suffix_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/swapcase_spec.rb b/spec/acceptance/swapcase_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/time_spec.rb b/spec/acceptance/time_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/to_bytes_spec.rb b/spec/acceptance/to_bytes_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/type_spec.rb b/spec/acceptance/type_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/union_spec.rb b/spec/acceptance/union_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/unique_spec.rb b/spec/acceptance/unique_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/unsupported_spec.rb b/spec/acceptance/unsupported_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/upcase_spec.rb b/spec/acceptance/upcase_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/uriescape_spec.rb b/spec/acceptance/uriescape_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/validate_absolute_path_spec.rb b/spec/acceptance/validate_absolute_path_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/validate_array_spec.rb b/spec/acceptance/validate_array_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/validate_augeas_spec.rb b/spec/acceptance/validate_augeas_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/validate_bool_spec.rb b/spec/acceptance/validate_bool_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/validate_cmd_spec.rb b/spec/acceptance/validate_cmd_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/validate_hash_spec.rb b/spec/acceptance/validate_hash_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/validate_ipv4_address_spec.rb b/spec/acceptance/validate_ipv4_address_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/validate_ipv6_address_spec.rb b/spec/acceptance/validate_ipv6_address_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/validate_re_spec.rb b/spec/acceptance/validate_re_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/validate_slength_spec.rb b/spec/acceptance/validate_slength_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/validate_string_spec.rb b/spec/acceptance/validate_string_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/values_at_spec.rb b/spec/acceptance/values_at_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/values_spec.rb b/spec/acceptance/values_spec.rb old mode 100644 new mode 100755 diff --git a/spec/acceptance/zip_spec.rb b/spec/acceptance/zip_spec.rb old mode 100644 new mode 100755 diff --git a/spec/classes/anchor_spec.rb b/spec/classes/anchor_spec.rb old mode 100644 new mode 100755 diff --git a/spec/lib/puppet_spec/compiler.rb b/spec/lib/puppet_spec/compiler.rb old mode 100644 new mode 100755 diff --git a/spec/lib/puppet_spec/database.rb b/spec/lib/puppet_spec/database.rb old mode 100644 new mode 100755 diff --git a/spec/lib/puppet_spec/matchers.rb b/spec/lib/puppet_spec/matchers.rb old mode 100644 new mode 100755 diff --git a/spec/lib/puppet_spec/modules.rb b/spec/lib/puppet_spec/modules.rb old mode 100644 new mode 100755 diff --git a/spec/lib/puppet_spec/pops.rb b/spec/lib/puppet_spec/pops.rb old mode 100644 new mode 100755 diff --git a/spec/lib/puppet_spec/scope.rb b/spec/lib/puppet_spec/scope.rb old mode 100644 new mode 100755 diff --git a/spec/lib/puppet_spec/settings.rb b/spec/lib/puppet_spec/settings.rb old mode 100644 new mode 100755 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb old mode 100644 new mode 100755 diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb old mode 100644 new mode 100755 diff --git a/spec/unit/facter/facter_dot_d_spec.rb b/spec/unit/facter/facter_dot_d_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/facter/pe_version_spec.rb b/spec/unit/facter/pe_version_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/facter/root_home_spec.rb b/spec/unit/facter/root_home_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/facter/util/puppet_settings_spec.rb b/spec/unit/facter/util/puppet_settings_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/any2array_spec.rb b/spec/unit/puppet/parser/functions/any2array_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/concat_spec.rb b/spec/unit/puppet/parser/functions/concat_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/count_spec.rb b/spec/unit/puppet/parser/functions/count_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/deep_merge_spec.rb b/spec/unit/puppet/parser/functions/deep_merge_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/defined_with_params_spec.rb b/spec/unit/puppet/parser/functions/defined_with_params_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/delete_undef_values_spec.rb b/spec/unit/puppet/parser/functions/delete_undef_values_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/delete_values_spec.rb b/spec/unit/puppet/parser/functions/delete_values_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/difference_spec.rb b/spec/unit/puppet/parser/functions/difference_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/ensure_packages_spec.rb b/spec/unit/puppet/parser/functions/ensure_packages_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/ensure_resource_spec.rb b/spec/unit/puppet/parser/functions/ensure_resource_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/floor_spec.rb b/spec/unit/puppet/parser/functions/floor_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb b/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/get_module_path_spec.rb b/spec/unit/puppet/parser/functions/get_module_path_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/getparam_spec.rb b/spec/unit/puppet/parser/functions/getparam_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/getvar_spec.rb b/spec/unit/puppet/parser/functions/getvar_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/has_key_spec.rb b/spec/unit/puppet/parser/functions/has_key_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/hash_spec.rb b/spec/unit/puppet/parser/functions/hash_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/intersection_spec.rb b/spec/unit/puppet/parser/functions/intersection_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/is_array_spec.rb b/spec/unit/puppet/parser/functions/is_array_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/is_bool_spec.rb b/spec/unit/puppet/parser/functions/is_bool_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/is_domain_name_spec.rb b/spec/unit/puppet/parser/functions/is_domain_name_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/is_float_spec.rb b/spec/unit/puppet/parser/functions/is_float_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/is_function_available.rb b/spec/unit/puppet/parser/functions/is_function_available.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/is_hash_spec.rb b/spec/unit/puppet/parser/functions/is_hash_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/is_integer_spec.rb b/spec/unit/puppet/parser/functions/is_integer_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/is_ip_address_spec.rb b/spec/unit/puppet/parser/functions/is_ip_address_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/is_mac_address_spec.rb b/spec/unit/puppet/parser/functions/is_mac_address_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/is_numeric_spec.rb b/spec/unit/puppet/parser/functions/is_numeric_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/is_string_spec.rb b/spec/unit/puppet/parser/functions/is_string_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/join_keys_to_values_spec.rb b/spec/unit/puppet/parser/functions/join_keys_to_values_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/join_spec.rb b/spec/unit/puppet/parser/functions/join_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/keys_spec.rb b/spec/unit/puppet/parser/functions/keys_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/loadyaml_spec.rb b/spec/unit/puppet/parser/functions/loadyaml_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/lstrip_spec.rb b/spec/unit/puppet/parser/functions/lstrip_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/member_spec.rb b/spec/unit/puppet/parser/functions/member_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/merge_spec.rb b/spec/unit/puppet/parser/functions/merge_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/num2bool_spec.rb b/spec/unit/puppet/parser/functions/num2bool_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/parsejson_spec.rb b/spec/unit/puppet/parser/functions/parsejson_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/parseyaml_spec.rb b/spec/unit/puppet/parser/functions/parseyaml_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/pick_default_spec.rb b/spec/unit/puppet/parser/functions/pick_default_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/prefix_spec.rb b/spec/unit/puppet/parser/functions/prefix_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/range_spec.rb b/spec/unit/puppet/parser/functions/range_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/reverse_spec.rb b/spec/unit/puppet/parser/functions/reverse_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/rstrip_spec.rb b/spec/unit/puppet/parser/functions/rstrip_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/shuffle_spec.rb b/spec/unit/puppet/parser/functions/shuffle_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/size_spec.rb b/spec/unit/puppet/parser/functions/size_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/sort_spec.rb b/spec/unit/puppet/parser/functions/sort_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/squeeze_spec.rb b/spec/unit/puppet/parser/functions/squeeze_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/str2bool_spec.rb b/spec/unit/puppet/parser/functions/str2bool_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/str2saltedsha512_spec.rb b/spec/unit/puppet/parser/functions/str2saltedsha512_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/strftime_spec.rb b/spec/unit/puppet/parser/functions/strftime_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/strip_spec.rb b/spec/unit/puppet/parser/functions/strip_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/suffix_spec.rb b/spec/unit/puppet/parser/functions/suffix_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/swapcase_spec.rb b/spec/unit/puppet/parser/functions/swapcase_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/time_spec.rb b/spec/unit/puppet/parser/functions/time_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/type_spec.rb b/spec/unit/puppet/parser/functions/type_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/union_spec.rb b/spec/unit/puppet/parser/functions/union_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/unique_spec.rb b/spec/unit/puppet/parser/functions/unique_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/upcase_spec.rb b/spec/unit/puppet/parser/functions/upcase_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/uriescape_spec.rb b/spec/unit/puppet/parser/functions/uriescape_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb b/spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/validate_array_spec.rb b/spec/unit/puppet/parser/functions/validate_array_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/validate_augeas_spec.rb b/spec/unit/puppet/parser/functions/validate_augeas_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/validate_bool_spec.rb b/spec/unit/puppet/parser/functions/validate_bool_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/validate_cmd_spec.rb b/spec/unit/puppet/parser/functions/validate_cmd_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/validate_hash_spec.rb b/spec/unit/puppet/parser/functions/validate_hash_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/validate_ipv4_address_spec.rb b/spec/unit/puppet/parser/functions/validate_ipv4_address_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/validate_ipv6_address_spec.rb b/spec/unit/puppet/parser/functions/validate_ipv6_address_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/validate_re_spec.rb b/spec/unit/puppet/parser/functions/validate_re_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/validate_string_spec.rb b/spec/unit/puppet/parser/functions/validate_string_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/values_at_spec.rb b/spec/unit/puppet/parser/functions/values_at_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/values_spec.rb b/spec/unit/puppet/parser/functions/values_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/parser/functions/zip_spec.rb b/spec/unit/puppet/parser/functions/zip_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/provider/file_line/ruby_spec.rb b/spec/unit/puppet/provider/file_line/ruby_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/type/anchor_spec.rb b/spec/unit/puppet/type/anchor_spec.rb old mode 100644 new mode 100755 diff --git a/spec/unit/puppet/type/file_line_spec.rb b/spec/unit/puppet/type/file_line_spec.rb old mode 100644 new mode 100755 -- cgit v1.2.3