Skip to content

Commit

Permalink
(spec) add network tests to support EL9
Browse files Browse the repository at this point in the history
  • Loading branch information
dtapiacl committed Jun 11, 2024
1 parent 4d33c9f commit ea915e0
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions spec/hosts/nodes/comcam-lion01.cp.lsst.org_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'comcam-lion01.cp.lsst.org', :sitepp do
on_supported_os.each do |os, os_facts|
next unless os =~ %r{almalinux-9-x86_64}

context "on #{os}" do
let(:facts) do
override_facts(os_facts,
fqdn: 'comcam-lion01.cp.lsst.org',
is_virtual: false,
virtual: 'physical',
dmi: {
'product' => {
'name' => 'Versalogic Corporation',
},
})
end
let(:node_params) do
{
cluster: 'comcam-ccs',
role: 'ccs-hcu',
site: 'cp',
}
end

it { is_expected.to compile.with_all_deps }

include_examples 'baremetal no bmc'
include_context 'with nm interface'
it { is_expected.to have_nm__connection_resource_count(2) }

context 'with enp0s31f6' do
let(:interface) { 'enp0s31f6' }

it_behaves_like 'nm enabled interface'
it_behaves_like 'nm dhcp interface'
it_behaves_like 'nm ethernet interface'
it { expect(nm_keyfile['ipv6']['method']).to eq('disabled') }
end

context 'with enp3s0' do
let(:interface) { 'enp3s0' }

it_behaves_like 'nm enabled interface'
it_behaves_like 'nm ethernet interface'
it { expect(nm_keyfile['ipv4']['address1']).to eq('192.168.1.122/24') }
it { expect(nm_keyfile['ipv4']['method']).to eq('manual') }
it { expect(nm_keyfile['ipv6']['method']).to eq('disabled') }
end
end # on os
end # on_supported_os
end

0 comments on commit ea915e0

Please sign in to comment.