|
22 | 22 | end |
23 | 23 | let(:node_params) do |
24 | 24 | { |
25 | | - role: 'rke', |
| 25 | + role: 'rke2server', |
26 | 26 | site: 'cp', |
27 | 27 | cluster: 'yepun', |
28 | 28 | } |
29 | 29 | end |
30 | 30 |
|
31 | 31 | it { is_expected.to compile.with_all_deps } |
32 | 32 |
|
33 | | - include_examples 'docker', docker_version: '25.0.3' |
34 | 33 | include_examples 'baremetal' |
35 | 34 | include_context 'with nm interface' |
36 | 35 | include_examples 'ceph cluster' |
|
47 | 46 | end |
48 | 47 |
|
49 | 48 | it do |
50 | | - is_expected.to contain_class('rke').with( |
51 | | - version: '1.8.0', |
52 | | - checksum: '8815da0452ae14a45566b534c48a2af6286ee73f800208ba6ec59188cb9a8d25' |
| 49 | + is_expected.to contain_class('rke2').with( |
| 50 | + node_type: 'server', |
| 51 | + release_series: '1.32', |
| 52 | + version: '1.32.2~rke2r1' |
53 | 53 | ) |
54 | 54 | end |
55 | 55 |
|
56 | | - it { is_expected.to have_nm__connection_resource_count(0) } |
| 56 | + it do |
| 57 | + expect(catalogue.resource('class', 'nm')[:conf]).to include( |
| 58 | + 'device' => { |
| 59 | + 'keep-configuration' => 'no', |
| 60 | + 'allowed-connections' => 'except:origin:nm-initrd-generator', |
| 61 | + } |
| 62 | + ) |
| 63 | + end |
| 64 | + |
| 65 | + it { is_expected.to have_nm__connection_resource_count(6) } |
| 66 | + |
| 67 | + %w[ |
| 68 | + enp71s0f3u1u1c2 |
| 69 | + ].each do |i| |
| 70 | + context "with #{i}" do |
| 71 | + let(:interface) { i } |
| 72 | + |
| 73 | + it_behaves_like 'nm disabled interface' |
| 74 | + end |
| 75 | + end |
| 76 | + |
| 77 | + %w[ |
| 78 | + eno1np0 |
| 79 | + eno2np1 |
| 80 | + ].each do |i| |
| 81 | + context "with #{i}" do |
| 82 | + let(:interface) { i } |
| 83 | + |
| 84 | + it_behaves_like 'nm named interface' |
| 85 | + it_behaves_like 'nm ethernet interface' |
| 86 | + it_behaves_like 'nm no-ip interface' |
| 87 | + it { expect(nm_keyfile['connection']['master']).to eq('bond0') } |
| 88 | + it { expect(nm_keyfile['connection']['slave-type']).to eq('bond') } |
| 89 | + it { expect(nm_keyfile_raw).to match(%r{^\[ethernet\]$}) } |
| 90 | + it { expect(nm_keyfile_raw).to match(%r{^\[ipv4\]$}) } |
| 91 | + it { expect(nm_keyfile_raw).to match(%r{^\[ipv6\]$}) } |
| 92 | + end |
| 93 | + end |
| 94 | + |
| 95 | + context 'with bond0' do |
| 96 | + let(:interface) { 'bond0' } |
| 97 | + |
| 98 | + it_behaves_like 'nm named interface' |
| 99 | + it_behaves_like 'nm no-ip interface' |
| 100 | + it { expect(nm_keyfile['connection']['type']).to eq('bond') } |
| 101 | + it { expect(nm_keyfile['bond']['miimon']).to eq(100) } |
| 102 | + it { expect(nm_keyfile['bond']['mode']).to eq('802.3ad') } |
| 103 | + it { expect(nm_keyfile['bond']['xmit_hash_policy']).to eq('layer3+4') } |
| 104 | + it { expect(nm_keyfile_raw).to match(%r{^\[ethernet\]$}) } |
| 105 | + it { expect(nm_keyfile_raw).not_to match(%r{^\[proxy\]$}) } |
| 106 | + end |
| 107 | + |
| 108 | + %w[ |
| 109 | + 1101 |
| 110 | + ].each do |vlan| |
| 111 | + iface = "bond0.#{vlan}" |
| 112 | + |
| 113 | + context "with #{iface}" do |
| 114 | + let(:interface) { iface } |
| 115 | + |
| 116 | + it_behaves_like 'nm enabled interface' |
| 117 | + it_behaves_like 'nm vlan interface', id: vlan.to_i, parent: 'bond0' |
| 118 | + it_behaves_like 'nm bridge slave interface', master: "br#{vlan}" |
| 119 | + end |
| 120 | + end |
| 121 | + |
| 122 | + context 'with br1101' do |
| 123 | + let(:interface) { 'br1101' } |
| 124 | + |
| 125 | + it_behaves_like 'nm enabled interface' |
| 126 | + it_behaves_like 'nm bridge interface' |
| 127 | + it_behaves_like 'nm dhcp interface' |
| 128 | + end |
57 | 129 | end # on os |
58 | 130 | end # on_supported_os |
59 | 131 | end |
0 commit comments