Skip to content

Commit 8fdd595

Browse files
author
Jeff McCune
committed
Merge branch 'fix/2.1.x/disable_puppet26_failing_tests' into 2.1.x
* fix/2.1.x/disable_puppet26_failing_tests: Disable tests that fail on 2.6.x due to #15912
2 parents 3f44686 + c81496e commit 8fdd595

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

spec/unit/puppet/parser/functions/getvar_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ def get_scope
2323
describe 'when calling getvar from puppet' do
2424

2525
it "should not compile when no arguments are passed" do
26+
pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./
2627
Puppet[:code] = '$rval = getvar()'
2728
get_scope
2829
expect { @scope.compiler.compile }.should raise_error(Puppet::ParseError, /wrong number of arguments/)
2930
end
3031
it "should not compile when too many arguments are passed" do
32+
pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./
3133
Puppet[:code] = '$rval = getvar("foo::bar", "baz")'
3234
get_scope
3335
expect { @scope.compiler.compile }.should raise_error(Puppet::ParseError, /wrong number of arguments/)

spec/unit/puppet/parser/functions/has_key_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,17 @@
2222

2323
describe 'when calling has_key from puppet' do
2424
it "should not compile when no arguments are passed" do
25+
pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./
2526
Puppet[:code] = '$rval = has_key()'
2627
expect { compiler.compile }.should raise_error(Puppet::ParseError, /wrong number of arguments/)
2728
end
2829
it "should not compile when 1 argument is passed" do
30+
pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./
2931
Puppet[:code] = "$rval = has_key('foo')"
3032
expect { compiler.compile }.should raise_error(Puppet::ParseError, /wrong number of arguments/)
3133
end
3234
it "should require the first value to be a Hash" do
35+
pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./
3336
Puppet[:code] = "$rval = has_key('foo', 'bar')"
3437
expect { compiler.compile }.should raise_error(Puppet::ParseError, /expects the first argument to be a hash/)
3538
end

spec/unit/puppet/parser/functions/merge_spec.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,33 +22,38 @@
2222

2323
describe 'when calling merge from puppet' do
2424
it "should not compile when no arguments are passed" do
25+
pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./
2526
Puppet[:code] = '$rval = merge()'
2627
expect { compiler.compile }.should raise_error(Puppet::ParseError, /wrong number of arguments/)
2728
end
29+
2830
it "should not compile when 1 argument is passed" do
31+
pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./
2932
Puppet[:code] = "$my_hash={'one' => 1}\n$rval = merge($my_hash)"
3033
expect { compiler.compile }.should raise_error(Puppet::ParseError, /wrong number of arguments/)
3134
end
3235
end
36+
3337
describe 'when calling merge on the scope instance' do
3438
it 'should require all parameters are hashes' do
3539
expect { new_hash = scope.function_merge([{}, '2'])}.should raise_error(Puppet::ParseError, /unexpected argument type String/)
3640

3741
end
42+
3843
it 'should be able to merge two hashes' do
3944
new_hash = scope.function_merge([{'one' => '1', 'two' => '1'}, {'two' => '2', 'three' => '2'}])
4045
new_hash['one'].should == '1'
4146
new_hash['two'].should == '2'
4247
new_hash['three'].should == '2'
4348
end
49+
4450
it 'should merge multiple hashes' do
4551
hash = scope.function_merge([{'one' => 1}, {'one' => '2'}, {'one' => '3'}])
4652
hash['one'].should == '3'
4753
end
54+
4855
it 'should accept empty hashes' do
4956
scope.function_merge([{},{},{}]).should == {}
5057
end
51-
5258
end
53-
5459
end

0 commit comments

Comments
 (0)