Sha256: 3a4b61eeba806f9b55d10673bfdfa8c420e037f3d7b75d0bf1dcbc5bd94e27a4

Contents?: true

Size: 719 Bytes

Versions: 14

Compression:

Stored size: 719 Bytes

Contents

require 'spec_helper_system'

describe 'mysql_user' do

  describe 'setup' do
    it 'should work with no errors' do
      pp = <<-EOS
        class { 'mysql::server': }
      EOS

      puppet_apply(pp)
    end
  end

  describe 'adding user' do
    it 'should work without errors' do
      pp = <<-EOS
        mysql_user { 'ashp@localhost':
          password_hash => '6f8c114b58f2ce9e',
        }
      EOS

      puppet_apply(pp)
    end

    it 'should find the user' do
      shell("mysql -NBe \"select '1' from mysql.user where CONCAT(user, '@', host) = 'ashp@localhost'\"") do |r|
        r.stdout.should =~ /^1$/
        r.stderr.should be_empty
        r.exit_code.should be_zero
      end
    end
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
freighthop-0.6.1 modules/mysql/spec/system/types/mysql_user_spec.rb
freighthop-0.6.0 modules/mysql/spec/system/types/mysql_user_spec.rb
freighthop-0.5.2 modules/mysql/spec/system/types/mysql_user_spec.rb
freighthop-0.5.1 modules/mysql/spec/system/types/mysql_user_spec.rb
freighthop-0.5.0 modules/mysql/spec/system/types/mysql_user_spec.rb
freighthop-0.4.1 modules/mysql/spec/system/types/mysql_user_spec.rb
freighthop-0.4.0 modules/mysql/spec/system/types/mysql_user_spec.rb
freighthop-0.3.3 modules/mysql/spec/system/types/mysql_user_spec.rb
freighthop-0.3.2 modules/mysql/spec/system/types/mysql_user_spec.rb
freighthop-0.3.1 modules/mysql/spec/system/types/mysql_user_spec.rb
freighthop-0.3.0 modules/mysql/spec/system/types/mysql_user_spec.rb
freighthop-0.2.1 modules/mysql/spec/system/types/mysql_user_spec.rb
freighthop-0.2.0 modules/mysql/spec/system/types/mysql_user_spec.rb
freighthop-0.1.0 modules/mysql/spec/system/types/mysql_user_spec.rb