Skip to content

Commit f107531

Browse files
author
Ashley Penney
committed
Fix this test for Debian. This is a total hack for now.
1 parent 84fc716 commit f107531

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

spec/acceptance/mysql_server_root_password_spec.rb

+11
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,14 @@ class { 'mysql::server': root_password => 'new', old_root_password => 'test' }
5858
end
5959
end
6060
end
61+
62+
# Debian relies on a debian-sys-maint@ account to do almost everything.
63+
# Without recreating this account we can't even stop the service in future
64+
# tests.
65+
if fact('osfamily') == 'Debian'
66+
describe 'readd debian user' do
67+
it 'readds the user' do
68+
shell("MYSQL_PASSWORD=`head -5 /etc/mysql/debian.cnf | grep password | cut -d' ' -f 3`; mysql -NBe \"GRANT ALL PRIVILEGES ON *.* to 'debian-sys-maint'@'localhost' IDENTIFIED BY '${MYSQL_PASSWORD}' WITH GRANT OPTION;\"")
69+
end
70+
end
71+
end

0 commit comments

Comments
 (0)