Debian Codegraph @

spec/defines/peers_spec.rb

raw
1 # frozen_string_literal: true
2
3 require 'spec_helper'
4
5 describe 'haproxy::peers' do
6 let :pre_condition do
7 'class{"haproxy":
8 config_file => "/tmp/haproxy.cfg"
9 }
10 '
11 end
12 let(:facts) do
13 {
14 networking: {
15 ip: '1.1.1.1'
16 },
17 concat_basedir: '/foo',
18 os: {
19 family: 'RedHat'
20 }
21 }
22 end
23
24 context 'when no options are passed' do
25 let(:title) { 'bar' }
26
27 it {
28 is_expected.to contain_concat__fragment('haproxy-bar_peers_block').with(
29 'order' => '30-peers-00-bar',
30 'target' => '/tmp/haproxy.cfg',
31 'content' => "\npeers bar\n",
32 )
33 }
34 end
35 end