Skip to content

Commit

Permalink
(spec) add lsstcam-dc10 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dtapiacl committed May 30, 2024
1 parent 48127d9 commit 4a3fdef
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions spec/hosts/nodes/lsstcam-dc10.cp.lsst.org_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'lsstcam-dc10.cp.lsst.org', :sitepp do
on_supported_os.each do |os, os_facts|
next if os =~ %r{centos-7-x86_64}

context "on #{os}" do
let(:facts) do
override_facts(os_facts,
fqdn: 'lsstcam-dc10.cp.lsst.org',
is_virtual: false,
virtual: 'physical',
dmi: {
'product' => {
'name' => 'PowerEdge R6515',
},
})
end
let(:node_params) do
{
role: 'ccs-dc',
cluster: 'lsstcam-ccs',
site: 'cp',
variant: 'r6515',
}
end

it { is_expected.to compile.with_all_deps }

include_examples 'baremetal'
include_context 'with nm interface'

it { is_expected.to have_nm__connection_resource_count(7) }

%w[
ens1f1np1
eno1
eno2
ens3f1np1
].each do |i|
context "with #{i}" do
let(:interface) { i }

it_behaves_like 'nm disabled interface'
end
end

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

it_behaves_like 'nm enabled interface'
it_behaves_like 'nm ethernet interface'
it { expect(nm_keyfile['ipv4']['address1']).to eq('139.229.175.74/26,139.229.175.126') }
it { expect(nm_keyfile['ipv4']['dns']).to eq('139.229.160.53;139.229.160.54;139.229.160.55;') }
it { expect(nm_keyfile['ipv4']['dns-search']).to eq('cp.lsst.org;') }
it { expect(nm_keyfile['ipv4']['method']).to eq('manual') }
end

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

it_behaves_like 'nm enabled interface'
it_behaves_like 'nm ethernet interface'
it_behaves_like 'nm bridge slave interface', master: 'lsst-daq'
it { expect(nm_keyfile['ethtool']['ring-rx']).to eq(4096) }
it { expect(nm_keyfile['ethtool']['ring-tx']).to eq(4096) }
end

context 'with lsst-daq' do
let(:interface) { 'lsst-daq' }

it_behaves_like 'nm enabled interface'
it_behaves_like 'nm dhcp interface'
it_behaves_like 'nm bridge interface'
end
end # on os
end # on_supported_os
end

0 comments on commit 4a3fdef

Please sign in to comment.