Projet

Général

Profil

Révision 95b1259b

ID95b1259b853f7459ba81fcb184e8126c00244ce1
Parent d78c1613
Enfant 9ae64df9

Ajouté par tr il y a plus de 4 ans

Add spec tests for ip nat prerouting

Voir les différences:

spec/classes/router_spec.rb
56 56
          :order   => '99',
57 57
        )}
58 58

  
59
        it { is_expected.to contain_concat('nftables-ip-nat-chain-PREROUTING').with(
60
          :path           => '/etc/nftables/puppet/ip-nat-chain-PREROUTING.nft',
61
          :owner          => 'root',
62
          :group          => 'root',
63
          :mode           => '0640',
64
          :ensure_newline => true,
65
        )}
66
        it { is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-header').with(
67
          :target  => 'nftables-ip-nat-chain-PREROUTING',
68
          :content => /^chain PREROUTING {$/,
69
          :order   => '00',
70
        )}
71
        it { is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-rule-type').with(
72
          :target  => 'nftables-ip-nat-chain-PREROUTING',
73
          :content => /^  type nat hook prerouting priority -100$/,
74
          :order   => '01',
75
        )}
76
        it { is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-rule-policy').with(
77
          :target  => 'nftables-ip-nat-chain-PREROUTING',
78
          :content => /^  policy accept$/,
79
          :order   => '02',
80
        )}
81
        it { is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-footer').with(
82
          :target  => 'nftables-ip-nat-chain-PREROUTING',
83
          :content => /^}$/,
84
          :order   => '99',
85
        )}
86

  
59 87
        it { is_expected.to contain_concat('nftables-ip-nat-chain-POSTROUTING').with(
60 88
          :path           => '/etc/nftables/puppet/ip-nat-chain-POSTROUTING.nft',
61 89
          :owner          => 'root',

Formats disponibles : Unified diff