<commit_before>require 'spec_helper'

describe 'zabbix::database' do
  let (:node) { 'rspec.puppet.com' }

  let (:pre_condition) do
    "class {'postgresql::server':}"
  end

  context 'On RedHat 6.5' do
    let (:facts) do
      {
        :kernel                    => 'Linux',
        :osfamily                  => 'RedHat',
        :operatingsystem           => 'RedHat',
        :operatingsystemrelease    => '6.5',
        :operatingsystemmajrelease => '6',
        :architecture              => 'x86_64',
        :lsbdistid                 => 'RedHat',
        :concat_basedir            => '/tmp',
        :puppetversion             => '4.0.0',
        :id                        => 'root',
      }
    end

    describe "database_type is postgresql, zabbix_type is server and is multiple host setup" do
      let (:params) do
        {
          :database_type    => 'postgresql',
          :database_name    => 'zabbix-server',
          :database_user    => 'zabbix-server',
          :zabbix_type      => 'server',
          :zabbix_web_ip    => '127.0.0.2',
          :zabbix_server_ip => '127.0.0.1',
        }
      end<commit_msg>add missing facts in database_spec<commit_after>require 'spec_helper'

describe 'zabbix::database' do
  let (:node) { 'rspec.puppet.com' }

  let (:pre_condition) do
    "class {'postgresql::server':}"
  end

  context 'On RedHat 6.5' do
    let (:facts) do
      {
        :osfamily                   => 'RedHat',
        :operatingsystem            => 'RedHat',
        :operatingsystemrelease     => '6.5',
        :operatingsystemmajrelease  => '6',
        :architecture               => 'x86_64',
        :lsbdistid                  => 'RedHat',
        :concat_basedir             => '/tmp',
        :is_pe                      => false,
        :puppetversion              => Puppet.version,
        :facterversion              => Facter.version,
        :ipaddress                  => '192.168.1.10',
        :lsbdistcodename            => '',
        :id                         => 'root',
        :kernel                     => 'Linux',
        :path                       => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin',
      }
    end

    describe "database_type is postgresql, zabbix_type is server and is multiple host setup" do
      let (:params) do
        {
          :database_type    => 'postgresql',
          :database_name    => 'zabbix-server',
          :database_user    => 'zabbix-server',
          :zabbix_type      => 'server',
          :zabbix_web_ip    => '127.0.0.2',
          :zabbix_server_ip => '127.0.0.1',
        }
      end
{'fraction_non_alphanumeric': 0.13386423966628744, 'fraction_numerical': 0.020477815699658702, 'mean_word_length': 1.433579335793358, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 40, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 5, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7032787', 'n_tokens_mistral': 875, 'n_tokens_neox': 818, 'n_words': 156}