File tree 1 file changed +6
-6
lines changed
spec/integration/application
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -650,10 +650,10 @@ def with_another_agent_running(&block)
650
650
. and output ( /No more routes to fileserver/ ) . to_stderr
651
651
end
652
652
653
- it 'Updates the old cached catalog if a resource failed to apply ' do
653
+ it 'preserves the old cached catalog if validation fails with the old one ' do
654
654
catalog_handler = -> ( req , res ) {
655
655
catalog = compile_to_catalog ( <<-MANIFEST , node )
656
- exec { 'unqualified_command': path => '' }
656
+ exec { 'unqualified_command': }
657
657
MANIFEST
658
658
659
659
res . body = formatter . render ( catalog )
@@ -665,14 +665,14 @@ def with_another_agent_running(&block)
665
665
expect {
666
666
agent . command_line . args << '--test'
667
667
agent . run
668
- } . to exit_with ( 4 )
668
+ } . to exit_with ( 1 )
669
669
. and output ( %r{Retrieving plugin} ) . to_stdout
670
- . and output ( %r{Error: Could not find command 'unqualified_command'} ) . to_stderr
670
+ . and output ( %r{Validation of Exec \[ unqualified_command \] failed: 'unqualified_command' is not qualified and no path was specified } ) . to_stderr
671
671
end
672
672
673
- # cached catalog should be updated
673
+ # cached catalog should not be updated
674
674
cached_catalog = "#{ File . join ( Puppet [ :client_datadir ] , 'catalog' , Puppet [ :certname ] ) } .json"
675
- expect ( File ) . to be_exist ( cached_catalog )
675
+ expect ( File ) . to_not be_exist ( cached_catalog )
676
676
end
677
677
end
678
678
You can’t perform that action at this time.
0 commit comments