Slide 48
Slide 48 text
@rynchantress Uptime 2017
def test_find_switchport
assetmgmt_helper =
Indigo::Helpers::RacktablesHelper.new(@config, @formatter)
assetmgmt_helper.stubs(:get_mac).returns("00AABBCCDDEE")
assetmgmt_helper.stubs(:get_switchname).returns("switch-123.e
tsy.com")
ipmi_helper = Indigo::Helpers::IpmiHelper.new(@config,
@formatter, assetmgmt_helper=assetmgmt_helper)
switchport = ipmi_helper.find_switchport("beerops-
test.etsy.com", 'ilo', snmp_helper)
assert_equal(["switch-123.etsy.com", "gi0/42"], switchport)
end