Permalink
Browse files

Merge pull request #154 from Paulche/master

Fix issue with redeclaration of database_user via mysql::db
  • Loading branch information...
2 parents ffc857d + 1d6ca77 commit a0df349ff6c4562d6830ef138b99766cfea6c868 @kbarber kbarber committed Feb 18, 2013
Showing with 10 additions and 7 deletions.
  1. +5 −6 manifests/db.pp
  2. +5 −1 spec/unit/mysql_password_spec.rb
View
@@ -52,14 +52,13 @@
charset => $charset,
provider => 'mysql',
require => Class['mysql::server'],
+ before => Database_user["${user}@${host}"],
}
- database_user { "${user}@${host}":
- ensure => $ensure,
- password_hash => mysql_password($password),
- provider => 'mysql',
- require => Database[$name],
- }
+ ensure_resource('database_user', "${user}@${host}", { ensure => $ensure,
+ password_hash => mysql_password($password),
+ provider => 'mysql'
+ })
if $ensure == 'present' {
database_grant { "${user}@${host}/${name}":
@@ -7,7 +7,11 @@
end
before :each do
- @scope = Puppet::Parser::Scope.new
+ @scope = if Puppet.version =~ /^3/
+ Puppet::Parser::Scope.new_for_test_harness('localhost')
+ else
+ Puppet::Parser::Scope.new
+ end
end
it "should exist" do

0 comments on commit a0df349

Please sign in to comment.