Projet

Général

Profil

Révision 1bf717d9

ID1bf717d906b9b7be0679d63f7489c7edc3ada73c
Parent 9dca9bc3
Enfant 18b211e7

Ajouté par Luis Fernández Álvarez il y a environ 4 ans

Add optional handling of chains

Voir les différences:

spec/classes/rules/docker_ce_spec.rb
84 84
        }
85 85
      end
86 86

  
87
      context 'with base chain management false' do
88
        let(:params) do
89
          {
90
            manage_base_chains: false,
91
          }
92
        end
93

  
94
        it { is_expected.to compile }
95

  
96
        it { is_expected.to contain_nftables__chain('DOCKER') }
97
        it { is_expected.to contain_nftables__chain('DOCKER_ISOLATION_STAGE_1') }
98
        it { is_expected.to contain_nftables__chain('DOCKER_ISOLATION_STAGE_2') }
99
        it { is_expected.to contain_nftables__chain('DOCKER_USER') }
100
        it { is_expected.to contain_nftables__chain('DOCKER-nat') }
101

  
102
        it { is_expected.not_to contain_nftables__chain('OUTPUT-nat') }
103
        it { is_expected.not_to contain_nftables__chain('INPUT-nat') }
104
      end
105

  
106
      context 'with docker chain management false' do
107
        let(:params) do
108
          {
109
            manage_docker_chains: false,
110
          }
111
        end
112

  
113
        it { is_expected.to compile }
114

  
115
        it { is_expected.not_to contain_nftables__chain('DOCKER') }
116
        it { is_expected.not_to contain_nftables__chain('DOCKER_ISOLATION_STAGE_1') }
117
        it { is_expected.not_to contain_nftables__chain('DOCKER_ISOLATION_STAGE_2') }
118
        it { is_expected.not_to contain_nftables__chain('DOCKER_USER') }
119
        it { is_expected.not_to contain_nftables__chain('DOCKER-nat') }
120

  
121
        it { is_expected.to contain_nftables__chain('OUTPUT-nat') }
122
        it { is_expected.to contain_nftables__chain('INPUT-nat') }
123
      end
124

  
87 125
      context 'with custom interface and subnet' do
88 126
        let(:params) do
89 127
          {

Formats disponibles : Unified diff