diff --git a/.github/workflows/gem_release.yaml b/.github/workflows/gem_release.yaml index 215971e375..98738cf862 100644 --- a/.github/workflows/gem_release.yaml +++ b/.github/workflows/gem_release.yaml @@ -15,7 +15,7 @@ jobs: name: Build the gem runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Install Ruby uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d2bd93e0e4..0520090dc4 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -25,7 +25,7 @@ jobs: runs-on: ${{ matrix.cfg.os }} steps: - name: Checkout current PR - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install ruby version ${{ matrix.cfg.ruby }} uses: ruby/setup-ruby@v1 @@ -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 @@ -54,7 +56,7 @@ jobs: runs-on: ${{ matrix.cfg.os }} steps: - name: Checkout current PR - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install ruby version ${{ matrix.cfg.ruby }} uses: ruby/setup-ruby@v1 diff --git a/spec/unit/file_system/path_pattern_spec.rb b/spec/unit/file_system/path_pattern_spec.rb index 8948dab949..cbecd07912 100644 --- a/spec/unit/file_system/path_pattern_spec.rb +++ b/spec/unit/file_system/path_pattern_spec.rb @@ -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') diff --git a/spec/unit/functions/break_spec.rb b/spec/unit/functions/break_spec.rb index 228bfa24fa..bf34a6b5de 100644 --- a/spec/unit/functions/break_spec.rb +++ b/spec/unit/functions/break_spec.rb @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/spec/unit/functions/next_spec.rb b/spec/unit/functions/next_spec.rb index 056db466bd..d745894fb2 100644 --- a/spec/unit/functions/next_spec.rb +++ b/spec/unit/functions/next_spec.rb @@ -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 diff --git a/spec/unit/functions/return_spec.rb b/spec/unit/functions/return_spec.rb index 1b439d5990..ccf312ad9c 100644 --- a/spec/unit/functions/return_spec.rb +++ b/spec/unit/functions/return_spec.rb @@ -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 @@ -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 diff --git a/spec/unit/http/service/compiler_spec.rb b/spec/unit/http/service/compiler_spec.rb index 85a839a7ca..ba07a2901c 100644 --- a/spec/unit/http/service/compiler_spec.rb +++ b/spec/unit/http/service/compiler_spec.rb @@ -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 diff --git a/spec/unit/parser/compiler_spec.rb b/spec/unit/parser/compiler_spec.rb index 8094fe207c..1186c09bd6 100644 --- a/spec/unit/parser/compiler_spec.rb +++ b/spec/unit/parser/compiler_spec.rb @@ -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 diff --git a/spec/unit/task_spec.rb b/spec/unit/task_spec.rb index f4c4bc7ef3..9bb5298f97 100644 --- a/spec/unit/task_spec.rb +++ b/spec/unit/task_spec.rb @@ -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 diff --git a/spec/unit/util/json_spec.rb b/spec/unit/util/json_spec.rb index 85d968cd3e..4ff468ce2b 100644 --- a/spec/unit/util/json_spec.rb +++ b/spec/unit/util/json_spec.rb @@ -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 @@ -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 @@ -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