yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #44759
[Bug 1534846] [NEW] IP address attribute test fails on OSX
Public bug reported:
The "59 1's" IP address test fails on OSX because it's interpreted as an
IPv4 address, which is different from a Linux system:
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "neutron/tests/unit/api/v2/test_attributes.py", line 254, in test_validate_ip_address
self.assertEqual("'%s' is not a valid IP address" % ip_addr, msg)
File "/Users/haley/neutron/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
self.assertThat(observed, matcher, message)
File "/Users/haley/neutron/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = "'11111111111111111111111111111111111111111111111111111111111' is not a valid IP address"
actual = u"'11111111111111111111111111111111111111111111111111111111111' is not an accepted IP address, '199.28.113.199' is recommended"
The code in neutron/api/v2/attributes.py actually has a good description
of the differences between Linux and BSD on this so I won't go into
detail.
The actual problem is that the code to detect the address has either a
':' or 3 '.' needs to raise an exception, instead of just setting 'msg'
since on OSX execution will continue, and the wrong error message will
get returned.
** Affects: neutron
Importance: Undecided
Assignee: Brian Haley (brian-haley)
Status: New
** Changed in: neutron
Assignee: (unassigned) => Brian Haley (brian-haley)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1534846
Title:
IP address attribute test fails on OSX
Status in neutron:
New
Bug description:
The "59 1's" IP address test fails on OSX because it's interpreted as
an IPv4 address, which is different from a Linux system:
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "neutron/tests/unit/api/v2/test_attributes.py", line 254, in test_validate_ip_address
self.assertEqual("'%s' is not a valid IP address" % ip_addr, msg)
File "/Users/haley/neutron/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
self.assertThat(observed, matcher, message)
File "/Users/haley/neutron/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = "'11111111111111111111111111111111111111111111111111111111111' is not a valid IP address"
actual = u"'11111111111111111111111111111111111111111111111111111111111' is not an accepted IP address, '199.28.113.199' is recommended"
The code in neutron/api/v2/attributes.py actually has a good
description of the differences between Linux and BSD on this so I
won't go into detail.
The actual problem is that the code to detect the address has either a
':' or 3 '.' needs to raise an exception, instead of just setting
'msg' since on OSX execution will continue, and the wrong error
message will get returned.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1534846/+subscriptions
Follow ups