File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
require 'spec_helper_acceptance'
2
+ require_relative './mysql_helper.rb'
2
3
3
4
describe 'mysql_user' do
4
5
describe 'setup' do
@@ -44,7 +45,7 @@ class { 'mysql::server': }
44
45
end
45
46
end
46
47
47
- describe 'changing authentication plugin' do
48
+ describe 'changing authentication plugin' , :if => version_is_greater_than ( '5.2.0' ) do
48
49
it 'should work without errors' do
49
50
pp = <<-EOS
50
51
mysql_user { 'ashp@localhost':
@@ -63,7 +64,12 @@ class { 'mysql::server': }
63
64
end
64
65
65
66
it 'should not have a password' do
66
- shell ( "mysql -NBe \" select password from mysql.user where CONCAT(user, '@', host) = 'ashp@localhost'\" " ) do |r |
67
+ table = if version_is_greater_than ( '5.7.0' )
68
+ "authentication_string"
69
+ else
70
+ "password"
71
+ end
72
+ shell ( "mysql -NBe \" select #{ table } from mysql.user where CONCAT(user, '@', host) = 'ashp@localhost'\" " ) do |r |
67
73
expect ( r . stdout . rstrip ) . to be_empty
68
74
expect ( r . stderr ) . to be_empty
69
75
end
You can’t perform that action at this time.
0 commit comments