Ticket #3505 (closed defect: Fixed)
Three unit tests in testDevice.TestDevice fail
| Reported by: | ian | Owned by: | ian |
|---|---|---|---|
| Priority: | 2 - High | Milestone: | Blue Crab |
| Component: | ZenModel | Version: | 2.2.3 |
| Keywords: | zenoss-2.2.4-verified | Cc: | |
| Community Patch Attached: | Deployed @ Customer: | ||
| Installer: | Any/All | Maintenance Target: | |
| Specific ZenPack: | Maintenance Status: | ||
| Documentation Note?: | Not required | Regression: |
Description
The problem is in checkDeviceExists, which should only do findDevice(ip) if ip exists. Since ip is empty, it returns the first device in the index.
======================================================================
ERROR: testManage_createDeviceDup (tests.testDevice.TestDevice)
----------------------------------------------------------------------
Traceback (most recent call last):
File "Users/ian/zenoss/lib/python/Testing/ZopeTestCase/profiler.py", line 98, in __call__
File "/Users/ian/src/zenoss/trunk/Products/ZenModel/tests/testDevice.py", line 56, in testManage_createDeviceDup
dev = manage_createDevice(self.dmd, 'mydevice', '/', manageIp='1.1.1.1')
File "/Users/ian/zenoss/Products/ZenModel/Device.py", line 102, in manage_createDevice
checkDeviceExists(context, deviceName, manageIp, performanceMonitor)
File "/Users/ian/zenoss/Products/ZenModel/Device.py", line 81, in checkDeviceExists
raise DeviceExistsError("Manage IP %s already exists" % deviceName,ip)
DeviceExistsError: Manage IP mydevice already exists
----------------------------------------------------------------------
Ran 42 tests in 227.024s
FAILED (errors=2)
Attachments
Change History
Note: See
TracTickets for help on using
tickets.