Skip to content

Commit

Permalink
revert spec change
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Sep 26, 2024
1 parent 5b36825 commit e2a70e8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/integration/application/agent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -650,10 +650,10 @@ def with_another_agent_running(&block)
.and output(/No more routes to fileserver/).to_stderr
end

it 'Updates the old cached catalog if a resource failed to apply' do
it 'preserves the old cached catalog if validation fails with the old one' do
catalog_handler = -> (req, res) {
catalog = compile_to_catalog(<<-MANIFEST, node)
exec { 'unqualified_command': path => '' }
exec { 'unqualified_command': }
MANIFEST

res.body = formatter.render(catalog)
Expand All @@ -665,14 +665,14 @@ def with_another_agent_running(&block)
expect {
agent.command_line.args << '--test'
agent.run
}.to exit_with(4)
}.to exit_with(1)
.and output(%r{Retrieving plugin}).to_stdout
.and output(%r{Error: Could not find command 'unqualified_command'}).to_stderr
.and output(%r{Validation of Exec\[unqualified_command\] failed: 'unqualified_command' is not qualified and no path was specified}).to_stderr
end

# cached catalog should be updated
# cached catalog should not be updated
cached_catalog = "#{File.join(Puppet[:client_datadir], 'catalog', Puppet[:certname])}.json"
expect(File).to be_exist(cached_catalog)
expect(File).to_not be_exist(cached_catalog)
end
end

Expand Down

0 comments on commit e2a70e8

Please sign in to comment.