Skip to content

Commit ce44b26

Browse files
authored
Merge pull request #9026 from tvpartytonight/PUP-11751-fix-apply-spec
(PUP-11751) Use format handler instead of to_json
2 parents c571910 + 2077c76 commit ce44b26

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

spec/integration/application/apply_spec.rb

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -202,27 +202,16 @@ class mod {
202202
compile_to_catalog('include mod', node)
203203
end
204204

205-
it 'can apply the catalog' do
206-
Puppet[:strict] = :warning
207-
catalog = compile_to_catalog('include mod', node)
208-
209-
Puppet[:environment] = env_name
210-
apply.command_line.args = ['--catalog', file_containing('manifest', catalog.to_json)]
211-
212-
expect {
213-
apply.run
214-
}.to output(%r{Notify\[The Street 23\]/message: defined 'message' as 'The Street 23'}).to_stdout
215-
end
216-
217205
it 'can apply the catalog with no warning' do
218-
pending("See PUP-11751")
219-
Puppet[:strict] = :warning
220206
logs = []
221207
Puppet::Util::Log.with_destination(Puppet::Test::LogCollector.new(logs)) do
222208
catalog = compile_to_catalog('include mod', node)
223209
Puppet[:environment] = env_name
224-
apply.command_line.args = ['--catalog', file_containing('manifest', catalog.to_json)]
225-
apply.run
210+
handler = Puppet::Network::FormatHandler.format(:rich_data_json)
211+
apply.command_line.args = ['--catalog', file_containing('manifest', handler.render(catalog))]
212+
expect {
213+
apply.run
214+
}.to output(%r{Notify\[The Street 23\]/message: defined 'message' as 'The Street 23'}).to_stdout
226215
end
227216
# expected to have no warnings
228217
expect(logs.select { |log| log.level == :warning }.map { |log| log.message }).to be_empty

0 commit comments

Comments
 (0)