@@ -652,28 +652,26 @@ def with_another_agent_running(&block)
652
652
653
653
it 'preserves the old cached catalog if validation fails with the old one' do
654
654
catalog_handler = -> ( req , res ) {
655
- catalog = compile_to_catalog ( <<-MANIFEST , node )
656
- exec { 'unqualified_command': }
657
- MANIFEST
658
-
659
- res . body = formatter . render ( catalog )
660
- res [ 'Content-Type' ] = formatter . mime
661
- }
662
-
663
- server . start_server ( mounts : { catalog : catalog_handler } ) do |port |
664
- Puppet [ :serverport ] = port
665
- expect {
666
- agent . command_line . args << '--test'
667
- agent . run
668
- } . to exit_with ( 1 )
669
- . and output ( %r{Retrieving plugin} ) . to_stdout
670
- . and output ( %r{Validation of Exec\[ unqualified_command\] failed: 'unqualified_command' is not qualified and no path was specified} ) . to_stderr
671
- end
672
-
673
- # cached catalog should not be updated
674
- cached_catalog = "#{ File . join ( Puppet [ :client_datadir ] , 'catalog' , Puppet [ :certname ] ) } .json"
675
- expect ( File ) . to_not be_exist ( cached_catalog )
676
- end
655
+  catalog = compile_to_catalog ( "exec {'unqualified_command': path => ''}" , node )
656
+ 
657
+  res . body = formatter . render ( catalog )
658
+  res [ 'Content-Type' ] = formatter . mime
659
+  }
660
+ 
661
+  server . start_server ( mounts : { catalog : catalog_handler } ) do |port |
662
+  Puppet [ :serverport ] = port
663
+  expect {
664
+  agent . command_line . args << '--test'
665
+  agent . run
666
+  } . to exit_with ( 1 )
667
+  . and output ( %r{Retrieving plugin} ) . to_stdout
668
+  . and output ( %r{Validation of Exec\[ unqualified_command\] failed: 'unqualified_command' is not qualified and no path was specified} ) . to_stderr
669
+  end
670
+ 
671
+  # cached catalog should not be updated
672
+  cached_catalog = "#{ File . join ( Puppet [ :client_datadir ] , 'catalog' , Puppet [ :certname ] ) } .json"
673
+  expect ( File ) . to_not be_exist ( cached_catalog )
674
+  end
677
675
end
678
676
679
677
context "reporting" do
0 commit comments