Révision fa92e118
Pet rubocop
spec/defines/rule_spec.rb | ||
---|---|---|
40 | 40 |
is_expected.to contain_concat__fragment('nftables-inet-filter-chain-CHAIN_NAME-rule-RULE_header').with( |
41 | 41 |
order: '50-nftables-inet-filter-chain-CHAIN_NAME-rule-RULE-a', |
42 | 42 |
target: 'nftables-inet-filter-chain-CHAIN_NAME', |
43 |
content: %r{^#.*$},
|
|
43 |
content: %r{^#.*$} |
|
44 | 44 |
) |
45 | 45 |
} |
46 | 46 |
it { |
47 | 47 |
is_expected.to contain_concat__fragment('nftables-inet-filter-chain-CHAIN_NAME-rule-RULE').with( |
48 | 48 |
order: '50-nftables-inet-filter-chain-CHAIN_NAME-rule-RULE-b', |
49 | 49 |
target: 'nftables-inet-filter-chain-CHAIN_NAME', |
50 |
content: ' port 22 allow',
|
|
50 |
content: ' port 22 allow' |
|
51 | 51 |
) |
52 | 52 |
} |
53 | 53 |
context 'with optional parameters set' do |
... | ... | |
60 | 60 |
is_expected.to contain_concat__fragment('nftables-TABLE-chain-CHAIN_NAME-rule-RULE_header').with( |
61 | 61 |
order: '85-nftables-TABLE-chain-CHAIN_NAME-rule-RULE-a', |
62 | 62 |
target: 'nftables-TABLE-chain-CHAIN_NAME', |
63 |
content: %r{^#.*$},
|
|
63 |
content: %r{^#.*$} |
|
64 | 64 |
) |
65 | 65 |
} |
66 | 66 |
it { is_expected.to contain_concat__fragment('nftables-TABLE-chain-CHAIN_NAME-rule-RULE') } |
... | ... | |
68 | 68 |
is_expected.to contain_concat__fragment('nftables-TABLE-chain-CHAIN_NAME-rule-RULE').with( |
69 | 69 |
order: '85-nftables-TABLE-chain-CHAIN_NAME-rule-RULE-b', |
70 | 70 |
target: 'nftables-TABLE-chain-CHAIN_NAME', |
71 |
content: ' port 22 allow',
|
|
71 |
content: ' port 22 allow' |
|
72 | 72 |
) |
73 | 73 |
} |
74 | 74 |
end |
... | ... | |
87 | 87 |
is_expected.to contain_concat__fragment('nftables-inet-filter-chain-CHAIN_NAME-rule-RULE_header').with( |
88 | 88 |
order: '50-nftables-inet-filter-chain-CHAIN_NAME-rule-RULE-a', |
89 | 89 |
target: 'nftables-inet-filter-chain-CHAIN_NAME', |
90 |
content: %r{^#.*$},
|
|
90 |
content: %r{^#.*$} |
|
91 | 91 |
) |
92 | 92 |
} |
93 | 93 |
it { |
94 | 94 |
is_expected.to contain_concat__fragment('nftables-inet-filter-chain-CHAIN_NAME-rule-RULE').with( |
95 | 95 |
order: '50-nftables-inet-filter-chain-CHAIN_NAME-rule-RULE-b', |
96 | 96 |
target: 'nftables-inet-filter-chain-CHAIN_NAME', |
97 |
source: 'puppet:///modules/foo/bar',
|
|
97 |
source: 'puppet:///modules/foo/bar' |
|
98 | 98 |
) |
99 | 99 |
} |
100 | 100 |
context 'with optional parameters set' do |
... | ... | |
107 | 107 |
is_expected.to contain_concat__fragment('nftables-TABLE-chain-CHAIN_NAME-rule-RULE_header').with( |
108 | 108 |
order: '85-nftables-TABLE-chain-CHAIN_NAME-rule-RULE-a', |
109 | 109 |
target: 'nftables-TABLE-chain-CHAIN_NAME', |
110 |
content: %r{^#.*$},
|
|
110 |
content: %r{^#.*$} |
|
111 | 111 |
) |
112 | 112 |
} |
113 | 113 |
it { is_expected.to contain_concat__fragment('nftables-TABLE-chain-CHAIN_NAME-rule-RULE') } |
... | ... | |
115 | 115 |
is_expected.to contain_concat__fragment('nftables-TABLE-chain-CHAIN_NAME-rule-RULE').with( |
116 | 116 |
order: '85-nftables-TABLE-chain-CHAIN_NAME-rule-RULE-b', |
117 | 117 |
target: 'nftables-TABLE-chain-CHAIN_NAME', |
118 |
source: 'puppet:///modules/foo/bar',
|
|
118 |
source: 'puppet:///modules/foo/bar' |
|
119 | 119 |
) |
120 | 120 |
} |
121 | 121 |
end |
... | ... | |
138 | 138 |
is_expected.to contain_concat__fragment('nftables-inet-filter-chain-CHAIN_NAME-rule-RULE-22_header').with( |
139 | 139 |
order: '50-nftables-inet-filter-chain-CHAIN_NAME-rule-RULE-22-a', |
140 | 140 |
target: 'nftables-inet-filter-chain-CHAIN_NAME', |
141 |
content: %r{^#.*$},
|
|
141 |
content: %r{^#.*$} |
|
142 | 142 |
) |
143 | 143 |
} |
144 | 144 |
it { |
145 | 145 |
is_expected.to contain_concat__fragment('nftables-inet-filter-chain-CHAIN_NAME-rule-RULE-22').with( |
146 | 146 |
order: '50-nftables-inet-filter-chain-CHAIN_NAME-rule-RULE-22-b', |
147 | 147 |
target: 'nftables-inet-filter-chain-CHAIN_NAME', |
148 |
content: ' port 22 allow',
|
|
148 |
content: ' port 22 allow' |
|
149 | 149 |
) |
150 | 150 |
} |
151 | 151 |
end |
Formats disponibles : Unified diff