From 2c6c2ff62db3cb9ee3b8bf755f66da4918783d28 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Mon, 20 Feb 2017 10:46:50 +0000 Subject: Fix acceptance test failure "Hiera is not a class" Due to [BKR-969](https://tickets.puppetlabs.com/browse/BKR-969) the global `Hiera` symbol is corrupted. Loading puppet before beaker fixes that. --- spec/acceptance/zip_spec.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'spec/acceptance/zip_spec.rb') diff --git a/spec/acceptance/zip_spec.rb b/spec/acceptance/zip_spec.rb index 139079e..7e586e2 100755 --- a/spec/acceptance/zip_spec.rb +++ b/spec/acceptance/zip_spec.rb @@ -1,6 +1,5 @@ #! /usr/bin/env ruby -S rspec require 'spec_helper_acceptance' -require 'puppet' describe 'zip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do describe 'success' do -- cgit v1.2.3 From 3fc7694d9fd46b4647eb562170af48ed819f64ab Mon Sep 17 00:00:00 2001 From: tphoney Date: Tue, 21 Feb 2017 15:12:08 +0000 Subject: remove unsupported platforms and future parser --- spec/acceptance/zip_spec.rb | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'spec/acceptance/zip_spec.rb') diff --git a/spec/acceptance/zip_spec.rb b/spec/acceptance/zip_spec.rb index 7e586e2..ae22896 100755 --- a/spec/acceptance/zip_spec.rb +++ b/spec/acceptance/zip_spec.rb @@ -1,7 +1,7 @@ #! /usr/bin/env ruby -S rspec require 'spec_helper_acceptance' -describe 'zip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do +describe 'zip function' do describe 'success' do it 'zips two arrays of numbers together' do pp = <<-EOS @@ -10,11 +10,7 @@ describe 'zip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operati $output = zip($one,$two) notice(inline_template('<%= @output.inspect %>')) EOS - if is_future_parser_enabled? - expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, 5\], \[2, 6\], \[3, 7\], \[4, 8\]\]/) - else - expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\["1", "5"\], \["2", "6"\], \["3", "7"\], \["4", "8"\]\]/) - end + expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, 5\], \[2, 6\], \[3, 7\], \[4, 8\]\]/) end it 'zips two arrays of numbers & bools together' do pp = <<-EOS @@ -23,11 +19,7 @@ describe 'zip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operati $output = zip($one,$two) notice(inline_template('<%= @output.inspect %>')) EOS - if is_future_parser_enabled? - expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, true\], \[2, true\], \["three", false\], \[4, false\]\]/) - else - expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\["1", true\], \["2", true\], \["three", false\], \["4", false\]\]/) - end + expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, true\], \[2, true\], \["three", false\], \[4, false\]\]/) end it 'zips two arrays of numbers together and flattens them' do # XXX This only tests the argument `true`, even though the following are valid: @@ -40,11 +32,7 @@ describe 'zip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operati $output = zip($one,$two,true) notice(inline_template('<%= @output.inspect %>')) EOS - if is_future_parser_enabled? - expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[1, 5, 2, 6, 3, 7, 4, 8\]/) - else - expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\["1", "5", "2", "6", "3", "7", "4", "8"\]/) - end + expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[1, 5, 2, 6, 3, 7, 4, 8\]/) end it 'handles unmatched length' do # XXX Is this expected behavior? @@ -54,11 +42,7 @@ describe 'zip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operati $output = zip($one,$two) notice(inline_template('<%= @output.inspect %>')) EOS - if is_future_parser_enabled? - expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, 5\], \[2, 6\]\]/) - else - expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\["1", "5"\], \["2", "6"\]\]/) - end + expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, 5\], \[2, 6\]\]/) end end describe 'failure' do @@ -68,7 +52,6 @@ describe 'zip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operati $output = zip($one) notice(inline_template('<%= @output.inspect %>')) EOS - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Wrong number of arguments/) end it 'handles improper argument types' do @@ -78,7 +61,6 @@ describe 'zip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operati $output = zip($one,$two) notice(inline_template('<%= @output.inspect %>')) EOS - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Requires array/) end end -- cgit v1.2.3