|
327 | 327 | describe "executing #{provider_name} check-update" do |
328 | 328 | it "passes repos to enable to '#{provider_name} check-update'" do |
329 | 329 | expect(Puppet::Util::Execution).to receive(:execute).with( |
330 | | - %W[/usr/bin/#{provider_name} check-update --enablerepo=updates --enablerepo=centosplus], |
| 330 | + %W[/usr/bin/#{provider_name} -y check-update --enablerepo=updates --enablerepo=centosplus], |
331 | 331 | any_args |
332 | 332 | ).and_return(double(:exitstatus => 0)) |
333 | 333 | described_class.check_updates([], %W[updates centosplus], []) |
334 | 334 | end |
335 | 335 |
|
336 | 336 | it "passes repos to disable to '#{provider_name} check-update'" do |
337 | 337 | expect(Puppet::Util::Execution).to receive(:execute).with( |
338 | | - %W[/usr/bin/#{provider_name} check-update --disablerepo=updates --disablerepo=centosplus], |
| 338 | + %W[/usr/bin/#{provider_name} -y check-update --disablerepo=updates --disablerepo=centosplus], |
339 | 339 | any_args |
340 | 340 | ).and_return(double(:exitstatus => 0)) |
341 | 341 | described_class.check_updates(%W[updates centosplus], [], []) |
342 | 342 | end |
343 | 343 |
|
344 | 344 | it "passes a combination of repos to enable and disable to '#{provider_name} check-update'" do |
345 | 345 | expect(Puppet::Util::Execution).to receive(:execute).with( |
346 | | - %W[/usr/bin/#{provider_name} check-update --disablerepo=updates --disablerepo=centosplus --enablerepo=os --enablerepo=contrib ], |
| 346 | + %W[/usr/bin/#{provider_name} -y check-update --disablerepo=updates --disablerepo=centosplus --enablerepo=os --enablerepo=contrib ], |
347 | 347 | any_args |
348 | 348 | ).and_return(double(:exitstatus => 0)) |
349 | 349 | described_class.check_updates(%W[updates centosplus], %W[os contrib], []) |
350 | 350 | end |
351 | 351 |
|
352 | 352 | it "passes disableexcludes to '#{provider_name} check-update'" do |
353 | 353 | expect(Puppet::Util::Execution).to receive(:execute).with( |
354 | | - %W[/usr/bin/#{provider_name} check-update --disableexcludes=main --disableexcludes=centosplus], |
| 354 | + %W[/usr/bin/#{provider_name} -y check-update --disableexcludes=main --disableexcludes=centosplus], |
355 | 355 | any_args |
356 | 356 | ).and_return(double(:exitstatus => 0)) |
357 | 357 | described_class.check_updates([], [], %W[main centosplus]) |
358 | 358 | end |
359 | 359 |
|
360 | 360 | it "passes all options to '#{provider_name} check-update'" do |
361 | 361 | expect(Puppet::Util::Execution).to receive(:execute).with( |
362 | | - %W[/usr/bin/#{provider_name} check-update --disablerepo=a --disablerepo=b --enablerepo=c --enablerepo=d --disableexcludes=e --disableexcludes=f], |
| 362 | + %W[/usr/bin/#{provider_name} -y check-update --disablerepo=a --disablerepo=b --enablerepo=c --enablerepo=d --disableexcludes=e --disableexcludes=f], |
363 | 363 | any_args |
364 | 364 | ).and_return(double(:exitstatus => 0)) |
365 | 365 | described_class.check_updates(%W[a b], %W[c d], %W[e f]) |
|
0 commit comments