Sha256: dd67fcf0c287e43aef1027a1ac007f293733472242b24f162f80c758ee28d5fe

Contents?: true

Size: 913 Bytes

Versions: 14

Compression:

Stored size: 913 Bytes

Contents

require 'spec_helper_system'

describe 'mysql::server::monitor class' do
  context 'should work with no errors' do
    pp = <<-EOS
      class { 'mysql::server': root_password => 'password' } 
      
      class { 'mysql::server::monitor':
        mysql_monitor_username => 'monitoruser',
        mysql_monitor_password => 'monitorpass',
        mysql_monitor_hostname => 'localhost',
      }
    EOS

    context puppet_apply(pp) do
      its(:stderr) { should be_empty }
      its(:exit_code) { should_not == 1 }
      its(:refresh) { should be_nil }
      its(:stderr) { should be_empty }
      its(:exit_code) { should be_zero }
    end

    context 'should run mysqladmin ping with no errors' do
      describe command("mysqladmin -u monitoruser -pmonitorpass -h localhost ping") do
        it { should return_stdout /mysqld is alive/ }
        it { should return_exit_status 0 }
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

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