Skip to content

Commit

Permalink
add unit test and cmdset for asyncos
Browse files Browse the repository at this point in the history
- The prompt specified in issue #3327 works
- Creating a cmdset in order to get a YAML simulation file
  • Loading branch information
robertcheramy committed Nov 29, 2024
1 parent 912451c commit ac37ada
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/device-simulation/cmdsets/asyncos
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version
showconfig
exit
17 changes: 17 additions & 0 deletions spec/model/asyncos.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
require_relative 'model_helper'

describe 'model/AsyncOS' do
before(:each) do
init_model_helper
@node = Oxidized::Node.new(name: 'example.com',
input: 'ssh',
model: 'asyncos')
end

it 'matches different prompts' do
_('(mail.example.com)> ').must_match AsyncOS.prompt
_('mail.example.com> ').must_match AsyncOS.prompt
# Devices running in cluster mode (see issue #3327)
_('(Machine hostname) ').must_match AsyncOS.prompt
end
end

0 comments on commit ac37ada

Please sign in to comment.