File: puppet_server_puppetdb_spec.rb

package info (click to toggle)
puppet-module-puppet 18.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 660 kB
  • sloc: ruby: 2,055; sh: 15; makefile: 10
file content (30 lines) | stat: -rw-r--r-- 1,017 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require 'spec_helper'

describe 'puppet::server::puppetdb' do
  on_supported_os.each do |os, os_facts|
    context "on #{os}", unless: unsupported_puppetserver_osfamily(os_facts[:osfamily]) do
      let(:facts) { os_facts }
      let(:params) { {server: 'mypuppetdb.example.com'} }
      let(:pre_condition) do
        <<-PUPPET
        class { 'puppet':
          server              => true,
          server_reports      => 'puppetdb,foreman',
          server_storeconfigs => true,
        }
        PUPPET
      end

      it { is_expected.to compile.with_all_deps }
      it { is_expected.to contain_puppet__config__server('storeconfigs').with_value(true) }
      it 'configures PuppetDB' do
        is_expected.to contain_class('puppetdb::master::config')
          .with_puppetdb_server('mypuppetdb.example.com')
          .with_puppetdb_port(8081)
          .with_puppetdb_soft_write_failure(false)
          .with_manage_storeconfigs(false)
          .with_restart_puppet(false)
      end
    end
  end
end