From 0ea083b643fc343e3fe9f9edefefb1543ad77355 Mon Sep 17 00:00:00 2001 From: Bryan Jen Date: Wed, 17 Aug 2016 09:55:33 -0700 Subject: [PATCH] (MODULES-3716) Fixes mysql_grant tests to create procedure before grant --- spec/acceptance/types/mysql_grant_spec.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spec/acceptance/types/mysql_grant_spec.rb b/spec/acceptance/types/mysql_grant_spec.rb index 95ddec6..b985c63 100644 --- a/spec/acceptance/types/mysql_grant_spec.rb +++ b/spec/acceptance/types/mysql_grant_spec.rb @@ -2,14 +2,14 @@ require 'spec_helper_acceptance' describe 'mysql_grant' do - describe 'setup' do - it 'setup mysql::server' do - pp = <<-EOS - class { 'mysql::server': } - EOS + before(:all) do + pp = <<-EOS + class { 'mysql::server': + root_password => 'password', + } + EOS - apply_manifest(pp, :catch_failures => true) - end + apply_manifest(pp, :catch_failures => true) end describe 'missing privileges for user' do @@ -414,7 +414,7 @@ describe 'mysql_grant' do pp = <<-EOS if $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemmajrelease, '16.00') > 0 { exec { 'simpleproc-create': - command => 'mysql --database=mysql --delimiter="//" -NBe "CREATE PROCEDURE simpleproc (OUT param1 INT) BEGIN SELECT COUNT(*) INTO param1 FROM t; end//"', + command => 'mysql --user="root" --password="password" --database=mysql --delimiter="//" -NBe "CREATE PROCEDURE simpleproc (OUT param1 INT) BEGIN SELECT COUNT(*) INTO param1 FROM t; end//"', path => '/usr/bin/', before => Mysql_user['test2@tester'], }