From: Wilson McCoubrey Date: Tue, 18 Oct 2016 10:15:38 +0000 (+0100) Subject: Fix tests to check for idempotency correctly. X-Git-Tag: 2.4.0~18^2~1 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=a17f128714bc02110dd273ef1c43bf093ae09c14;p=puppet-modules%2Fpuppetlabs-apt.git Fix tests to check for idempotency correctly. --- diff --git a/spec/acceptance/apt_key_provider_spec.rb b/spec/acceptance/apt_key_provider_spec.rb index 274df5e..3e056ee 100644 --- a/spec/acceptance/apt_key_provider_spec.rb +++ b/spec/acceptance/apt_key_provider_spec.rb @@ -92,7 +92,7 @@ describe 'apt_key' do # Time to remove it using Puppet apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) shell(CENTOS_KEY_CHECK_COMMAND, :acceptable_exit_codes => [1]) @@ -118,7 +118,7 @@ describe 'apt_key' do # Time to remove it using Puppet apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) shell(PUPPETLABS_KEY_CHECK_COMMAND, :acceptable_exit_codes => [1]) @@ -189,7 +189,7 @@ zGioYMWgVePywFGaTV51/0uF9ymHHC7BDIcLgUWHdg/1B67jR5YQfzPJUqLhnylt EOS apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) shell(PUPPETLABS_KEY_CHECK_COMMAND) end end @@ -449,7 +449,7 @@ FPfZDNCu/TXoqyJk7434jJrcHgPryzrHFBLfEmc= } EOS apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) shell(PUPPETLABS_KEY_CHECK_COMMAND) end end @@ -483,7 +483,7 @@ FPfZDNCu/TXoqyJk7434jJrcHgPryzrHFBLfEmc= EOS apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) shell(PUPPETLABS_KEY_CHECK_COMMAND) end end @@ -499,7 +499,7 @@ FPfZDNCu/TXoqyJk7434jJrcHgPryzrHFBLfEmc= EOS apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) shell(PUPPETLABS_KEY_CHECK_COMMAND) end end @@ -549,7 +549,7 @@ FPfZDNCu/TXoqyJk7434jJrcHgPryzrHFBLfEmc= EOS apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) shell(PUPPETLABS_KEY_CHECK_COMMAND) end @@ -563,7 +563,7 @@ FPfZDNCu/TXoqyJk7434jJrcHgPryzrHFBLfEmc= EOS apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) shell(PUPPETLABS_KEY_CHECK_COMMAND) end @@ -612,7 +612,7 @@ FPfZDNCu/TXoqyJk7434jJrcHgPryzrHFBLfEmc= EOS apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) shell(CENTOS_KEY_CHECK_COMMAND) end @@ -656,7 +656,7 @@ FPfZDNCu/TXoqyJk7434jJrcHgPryzrHFBLfEmc= EOS apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) shell(PUPPETLABS_KEY_CHECK_COMMAND) end @@ -670,7 +670,7 @@ FPfZDNCu/TXoqyJk7434jJrcHgPryzrHFBLfEmc= EOS apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) shell(PUPPETLABS_KEY_CHECK_COMMAND) end @@ -723,7 +723,7 @@ FPfZDNCu/TXoqyJk7434jJrcHgPryzrHFBLfEmc= EOS apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) shell(PUPPETLABS_KEY_CHECK_COMMAND) end end @@ -780,7 +780,7 @@ FPfZDNCu/TXoqyJk7434jJrcHgPryzrHFBLfEmc= EOS apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) shell(PUPPETLABS_KEY_CHECK_COMMAND) end end @@ -798,7 +798,7 @@ FPfZDNCu/TXoqyJk7434jJrcHgPryzrHFBLfEmc= EOS apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) end end diff --git a/spec/acceptance/apt_spec.rb b/spec/acceptance/apt_spec.rb index 8a9d4ca..86c93ff 100644 --- a/spec/acceptance/apt_spec.rb +++ b/spec/acceptance/apt_spec.rb @@ -43,7 +43,7 @@ describe 'apt class' do EOS apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) end it 'should still work' do shell('apt-get update') diff --git a/spec/acceptance/class_spec.rb b/spec/acceptance/class_spec.rb index f228e4c..1539a0d 100644 --- a/spec/acceptance/class_spec.rb +++ b/spec/acceptance/class_spec.rb @@ -11,7 +11,7 @@ describe 'apt class' do # Run it twice and test for idempotency apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) end end end