-
Notifications
You must be signed in to change notification settings - Fork 932
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3233 from mabezi/patch-1
update prompt for aosw
- Loading branch information
Showing
3 changed files
with
55 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
require_relative '../spec_helper' | ||
|
||
describe 'Model aosw' do | ||
before(:each) do | ||
Oxidized.asetus = Asetus.new | ||
Oxidized.asetus.cfg.debug = false | ||
Oxidized.setup_logger | ||
|
||
Oxidized::Node.any_instance.stubs(:resolve_repo) | ||
Oxidized::Node.any_instance.stubs(:resolve_output) | ||
|
||
@node = Oxidized::Node.new(name: 'example.com', | ||
input: 'ssh', | ||
output: 'file', | ||
model: 'aosw', | ||
username: 'alma', | ||
password: 'armud') | ||
end | ||
|
||
it "matches different prompts" do | ||
# Virtual controller - ArubaOS (MODEL: 515), Version 8.10.0.7 LSR | ||
_('AAAA-AP123456# ').must_match AOSW.prompt | ||
|
||
# Hardware controller- ArubaOS (MODEL: Aruba7210), Version 8.10.0.7 LSR | ||
# - (host) ^[mynode] – This indicates unsaved configuration. | ||
# - (host) *[mynode] – This indicates available crash information. | ||
# - (host) [mynode] – This indicates a saved configuration. | ||
# [mynode] indicates the "path" you are in. On my controller, it can be | ||
# [/], [mm] or [mynode]. you have to 'cd ..' or 'cd /' to change it, so | ||
# we may never encounter [/]. | ||
# There could be other values than [/], [mm] or [mynode] | ||
# Now to the test prompts: | ||
# Controller with saved configuration | ||
_('(WPP-ArubaVMC) [mynode] #').must_match AOSW.prompt | ||
# Controller with unsaved configuration | ||
_('(AAAA-WLC42) ^[mynode] #').must_match AOSW.prompt | ||
# Controller with available crash information | ||
_('(AAAA-WLC42) *[mynode] #').must_match AOSW.prompt | ||
# Controller with crash information in path / | ||
_('(AAAA-WLC42) *[/] #').must_match AOSW.prompt | ||
# Controller with saved configuration in path mm | ||
_('(AAAA-WLC42) [mm] #').must_match AOSW.prompt | ||
end | ||
end |