From a17f128714bc02110dd273ef1c43bf093ae09c14 Mon Sep 17 00:00:00 2001 From: Wilson McCoubrey Date: Tue, 18 Oct 2016 11:15:38 +0100 Subject: [PATCH] Fix tests to check for idempotency correctly. --- spec/acceptance/apt_key_provider_spec.rb | 28 ++++++++++++------------ spec/acceptance/apt_spec.rb | 2 +- spec/acceptance/class_spec.rb | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) 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 -- 2.45.2