Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/gem_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
contents: write # clone repo and create release
steps:
- name: Download gem from GitHub cache
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: gem-artifact
- name: Create Release
Expand All @@ -56,7 +56,7 @@ jobs:
packages: write # publish to rubygems.pkg.github.com
steps:
- name: Download gem from GitHub cache
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: gem-artifact
- name: Publish gem to GitHub packages
Expand All @@ -73,7 +73,7 @@ jobs:
id-token: write # rubygems.org authentication
steps:
- name: Download gem from GitHub cache
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: gem-artifact
- uses: rubygems/[email protected]
Expand All @@ -92,7 +92,7 @@ jobs:
- release-to-rubygems
steps:
- name: Download gem from GitHub cache
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: gem-artifact
- name: Install Ruby
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
- {os: ubuntu-24.04, ruby: '3.3'} # openssl 3
- {os: ubuntu-24.04, ruby: '3.4'} # openssl 3
- {os: ubuntu-24.04, ruby: 'jruby-9.4'}
- {os: ubuntu-24.04, ruby: 'jruby-9.4.8.0'}
- {os: ubuntu-24.04, ruby: 'jruby-9.4.13.0'}
- {os: windows-2025, ruby: '3.1'}
- {os: windows-2025, ruby: '3.2'} # openssl 3
- {os: windows-2025, ruby: '3.3'} # openssl 3
Expand Down
3 changes: 0 additions & 3 deletions spec/unit/file_system/path_pattern_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@
end

it 'globs wildcard patterns properly' do
# See PUP-11788 and https://github.com/jruby/jruby/issues/7836.
pending 'JRuby does not properly handle Dir.glob' if Puppet::Util::Platform.jruby?

dir = tmpdir('globtest')
create_file_in(dir, 'foo.pp')
create_file_in(dir, 'foo.pp.pp')
Expand Down
8 changes: 4 additions & 4 deletions spec/unit/functions/break_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class does_break {
}
include(does_break)
CODE
end.to raise_error(/break\(\) from context where this is illegal \(file: unknown, line: 3\) on node.*/)
end.to raise_error(/break\(\) from context where this is illegal .*/)
end

it 'does not provide early exit from a define' do
Expand All @@ -166,7 +166,7 @@ class does_break {
}
does_break { 'no_you_cannot': }
CODE
end.to raise_error(/break\(\) from context where this is illegal \(file: unknown, line: 3\) on node.*/)
end.to raise_error(/break\(\) from context where this is illegal .*/)
end

it 'can be called when nested in a function to make that function behave as a break' do
Expand All @@ -191,7 +191,7 @@ class does_break {
$result = with(1) |$x| { with($x) |$x| {break() }}
notice $result
CODE
end.to raise_error(/break\(\) from context where this is illegal \(file: unknown, line: 3\) on node.*/)
end.to raise_error(/break\(\) from context where this is illegal .*/)
end

it 'can not be called from top scope' do
Expand All @@ -201,7 +201,7 @@ class does_break {
# line 2
break()
CODE
end.to raise_error(/break\(\) from context where this is illegal \(file: unknown, line: 3\) on node.*/)
end.to raise_error(/break\(\) from context where this is illegal .*/)
end
end
end
2 changes: 1 addition & 1 deletion spec/unit/functions/next_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ class does_next {
# line 2
next()
CODE
end.to raise_error(/next\(\) from context where this is illegal \(file: unknown, line: 3\) on node.*/)
end.to raise_error(/next\(\) from context where this is illegal .*/)
end
end
4 changes: 2 additions & 2 deletions spec/unit/functions/return_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class does_next {
$result = with(1) |$x| { with($x) |$x| {return(100) }}
notice $result
CODE
end.to raise_error(/return\(\) from context where this is illegal \(file: unknown, line: 3\) on node.*/)
end.to raise_error(/return\(\) from context where this is illegal .*/)
end

it 'can not be called from top scope' do
Expand All @@ -104,6 +104,6 @@ class does_next {
# line 2
return()
CODE
end.to raise_error(/return\(\) from context where this is illegal \(file: unknown, line: 3\) on node.*/)
end.to raise_error(/return\(\) from context where this is illegal .*/)
end
end
2 changes: 1 addition & 1 deletion spec/unit/http/service/compiler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@
invalid_facts = Puppet::Node::Facts.new(certname, {'invalid_utf8_sequence' => "\xE2\x82".force_encoding('binary')})
expect {
subject.put_facts(certname, environment: 'production', facts: invalid_facts)
}.to raise_error(Puppet::HTTP::SerializationError, /Failed to serialize Puppet::Node::Facts to json: ("\\xE2" from ASCII-8BIT to UTF-8|partial character in source, but hit end)/)
}.to raise_error(Puppet::HTTP::SerializationError, /Failed to serialize Puppet::Node::Facts to json: /)
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/unit/parser/compiler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ class #{name} {}
include #{name}
}
MANIFEST
}.to raise_error(Puppet::Error, /Class '#{name}' is already defined \(line: 1\); cannot be redefined as a node \(line: 2\) on node #{name}/)
}.to raise_error(Puppet::Error, /Class '#{name}' is already defined \(line: 1\); cannot be redefined as a node /)
end

it "evaluates the class if the node definition uses a regexp" do
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/task_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@

expect {
tasks[0].metadata
}.to raise_error(Puppet::Module::Task::InvalidMetadata, /expected ':' after object key/)
}.to raise_error(Puppet::Module::Task::InvalidMetadata)
end

it 'returns empty hash for metadata when json metadata file is empty' do
Expand Down
6 changes: 3 additions & 3 deletions spec/unit/util/json_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
it 'raises an error if JSON is invalid' do
expect {
Puppet::Util::Json.load('{ invalid')
}.to raise_error(Puppet::Util::Json::ParseError, /expected object key, got 'invalid' at line 1 column 3/)
}.to raise_error(Puppet::Util::Json::ParseError)
end

it 'raises an error if the content is empty' do
Expand Down Expand Up @@ -74,7 +74,7 @@
it 'returns nil when the file is invalid JSON and debug logs about it' do
file_path = file_containing('input', '{ invalid')
expect(Puppet).to receive(:debug)
.with(/Could not retrieve JSON content .+: expected object key, got 'invalid' at line 1 column 3/).and_call_original
.with(/Could not retrieve JSON content/).and_call_original

expect(Puppet::Util::Json.load_file_if_valid(file_path)).to eql(nil)
end
Expand Down Expand Up @@ -102,7 +102,7 @@

expect {
Puppet::Util::Json.load_file(file_path)
}.to raise_error(Puppet::Util::Json::ParseError, /expected object key, got 'invalid' at line 1 column 3/)
}.to raise_error(Puppet::Util::Json::ParseError)
end

it 'raises an error when the filename is illegal' do
Expand Down