Projet

Général

Profil

Révision 825f4eb1

ID825f4eb1becec3d5b7a4476bbe55d95fafc94ee6
Parent d7bd6638
Enfant b5633532

Ajouté par Tim Skirvin il y a plus d'un an

trying out a spec to mix port arrays and ranges

Voir les différences:

spec/defines/simplerule_spec.rb
104 104
        }
105 105
      end
106 106

  
107
      describe 'port array and range' do
108
        let(:params) do
109
          {
110
            dport: [333, 335, '338-339'],
111
            sport: [433, 435, '438-439'],
112
            proto: 'tcp',
113
          }
114
        end
115

  
116
        it { is_expected.to compile }
117

  
118
        it {
119
          expect(subject).to contain_nftables__rule('default_in-my_default_rule_name').with(
120
            content: 'tcp sport {433, 435, 438-439} tcp dport {333, 335, 338-339} accept'
121
          )
122
        }
123
      end
124

  
107 125
      describe 'only sport TCP traffic' do
108 126
        let(:params) do
109 127
          {

Formats disponibles : Unified diff