From e2a70e884917179899a56cd3e83f9089cc299b57 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 26 Sep 2024 19:55:27 +0200 Subject: [PATCH] revert spec change --- spec/integration/application/agent_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/integration/application/agent_spec.rb b/spec/integration/application/agent_spec.rb index fd3f59e52d8..5b033665289 100644 --- a/spec/integration/application/agent_spec.rb +++ b/spec/integration/application/agent_spec.rb @@ -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) @@ -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