Skip to content

Commit

Permalink
Fix cumulus model tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robertcheramy committed Jan 9, 2025
1 parent cc98cfe commit edb782b
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions spec/model/cumulus_spec.rb
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
require_relative 'model_helper'

describe 'model/Cumulus' do
describe 'Model Cumulus' do
before(:each) do
init_model_helper

@node = Oxidized::Node.new(name: 'example.com',
input: 'ssh',
model: 'cumulus')
end

it 'runs on MSN2010 with Cumulus Linux 5.9.2 (nvue mode)' do
skip 'TODO: needs to be adapted to ATOMS'
# Reload node with vars cumulus_use_nvue set
@node = Oxidized::Node.new(name: 'example.com',
input: 'ssh',
model: 'cumulus',
vars: { cumulus_use_nvue: true })

mockmodel = MockSsh.new('data/cumulus:MSN2010_5.9.2_nvue:simulation.yaml')
model = YAML.load_file('spec/model/data/cumulus:MSN2010_5.9.2_nvue:simulation.yaml')
mockmodel = MockSsh.new(model)
Net::SSH.stubs(:start).returns mockmodel

status, result = @node.run

_(status).must_equal :success
_(result.to_cfg).must_equal mockmodel.oxidized_output
_(result.to_cfg).must_equal mockmodel.interpolate_yaml(model['oxidized_output'])
end

it 'runs on VX with Cumulus Linux 5.4.0 (frr mode)' do
skip 'TODO: needs to be adapted to ATOMS'
# Reload node with vars cumulus_use_nvue set
@node = Oxidized::Node.new(name: 'example.com',
input: 'ssh',
Expand All @@ -37,12 +32,13 @@
vars: { cumulus_routing_daemon: 'frr',
enable: true })

mockmodel = MockSsh.new('data/cumulus:VX_5.4.0_frr:simulation.yaml')
model = YAML.load_file('spec/model/data/cumulus:VX_5.4.0_frr:simulation.yaml')
mockmodel = MockSsh.new(model)
Net::SSH.stubs(:start).returns mockmodel

status, result = @node.run

_(status).must_equal :success
_(result.to_cfg).must_equal mockmodel.oxidized_output
_(result.to_cfg).must_equal mockmodel.interpolate_yaml(model['oxidized_output'])
end
end

0 comments on commit edb782b

Please sign in to comment.