root / spec / classes / bridges_spec.rb @ 1bf717d9
Historique | Voir | Annoter | Télécharger (1,09 ko)
1 | fd0eaeca | tr | require 'spec_helper'
|
---|---|---|---|
2 | |||
3 | describe 'nftables' do |
||
4 | let(:pre_condition) { 'Exec{path => "/bin"}' } |
||
5 | |||
6 | on_supported_os.each do |os, os_facts|
|
||
7 | context "on #{os}" do |
||
8 | 300b7382 | Steve Traylen | context 'with bridge interfaces br0 and br1-2' do |
9 | let(:facts) do |
||
10 | os_facts.merge( |
||
11 | networking:
|
||
12 | { interfaces:
|
||
13 | { |
||
14 | 'lo' => {},
|
||
15 | 'br0' => {},
|
||
16 | 'br1-2' => {},
|
||
17 | } }, |
||
18 | ) |
||
19 | end
|
||
20 | fd0eaeca | tr | |
21 | 300b7382 | Steve Traylen | it { is_expected.to compile } |
22 | it { is_expected.not_to contain_nftables__rule('default_fwd-bridge_lo_lo') }
|
||
23 | fd0eaeca | tr | |
24 | 300b7382 | Steve Traylen | it { |
25 | is_expected.to contain_nftables__rule('default_fwd-bridge_br0_br0').with(
|
||
26 | order: '08', |
||
27 | content: 'iifname br0 oifname br0 accept', |
||
28 | ) |
||
29 | } |
||
30 | |||
31 | it { is_expected.to contain_nftables__rule('default_fwd-bridge_br1_br1') }
|
||
32 | it { |
||
33 | is_expected.to contain_nftables__rule('default_fwd-bridge_br1_br1').with(
|
||
34 | order: '08', |
||
35 | content: 'iifname br1 oifname br1 accept', |
||
36 | ) |
||
37 | } |
||
38 | end
|
||
39 | fd0eaeca | tr | end
|
40 | end
|
||
41 | end |