From eee60088dde68c7cdffeb706000e9e8249621209 Mon Sep 17 00:00:00 2001 From: Ashley Penney Date: Tue, 11 Feb 2014 17:10:35 -0500 Subject: [PATCH] (maint) Fix the specs due to changes to backup. --- spec/acceptance/mysql_backup_spec.rb | 1 - spec/acceptance/mysql_bindings_spec.rb | 8 ++++++-- spec/acceptance/mysql_db_spec.rb | 6 ++---- spec/acceptance/types/mysql_grant_spec.rb | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/spec/acceptance/mysql_backup_spec.rb b/spec/acceptance/mysql_backup_spec.rb index 75e8baa..7831250 100644 --- a/spec/acceptance/mysql_backup_spec.rb +++ b/spec/acceptance/mysql_backup_spec.rb @@ -29,7 +29,6 @@ describe 'mysql::server::backup class' do end apply_manifest(pp, :catch_failures => true) do |r| expect(r.stderr).to eq("") - expect(r.exit_code).to be_zero end end end diff --git a/spec/acceptance/mysql_bindings_spec.rb b/spec/acceptance/mysql_bindings_spec.rb index 927c8a6..725ced0 100644 --- a/spec/acceptance/mysql_bindings_spec.rb +++ b/spec/acceptance/mysql_bindings_spec.rb @@ -97,8 +97,12 @@ describe 'mysql::bindings class' do it { should be_installed } end - describe package(php_package) do - it { should be_installed } + # This package is not available out of the box and adding in other repos + # is a bit much for the scope of this test. + unless fact('osfamily') == 'RedHat' + describe package(php_package) do + it { should be_installed } + end end describe package(python_package) do diff --git a/spec/acceptance/mysql_db_spec.rb b/spec/acceptance/mysql_db_spec.rb index f037ddc..1fd7afd 100644 --- a/spec/acceptance/mysql_db_spec.rb +++ b/spec/acceptance/mysql_db_spec.rb @@ -14,10 +14,8 @@ describe 'mysql::db define' do # Run it twice and test for idempotency apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end + apply_manifest(pp, :catch_changes => true) - it 'should have the database' do expect(shell("mysql -e 'show databases;'|grep spec1").exit_code).to be_zero end end @@ -41,7 +39,7 @@ describe 'mysql::db define' do # Run it twice and test for idempotency apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero + apply_manifest(pp, :catch_changes => true) end it 'should have the table' do diff --git a/spec/acceptance/types/mysql_grant_spec.rb b/spec/acceptance/types/mysql_grant_spec.rb index 8392efb..83bdf6e 100644 --- a/spec/acceptance/types/mysql_grant_spec.rb +++ b/spec/acceptance/types/mysql_grant_spec.rb @@ -254,7 +254,7 @@ describe 'mysql_grant' do EOS apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero + apply_manifest(pp, :catch_changes => true) end end