unit test failed for test objects

Bug #1413144 reported by Kai Qiang Wu(Kennan)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
Guangya Liu (Jay Lau)

Bug Description

During code review, find

http://logs.openstack.org/56/148756/2/check/gate-magnum-python27/dccec5d/console.html

2015-01-21 10:08:09.107 | OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
2015-01-21 10:08:09.107 | OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-160} \
2015-01-21 10:08:09.107 | ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./magnum/tests} --load-list /tmp/tmp.CsoXCgvyUz/tmp5gO1_P
2015-01-21 10:08:09.107 | ======================================================================
2015-01-21 10:08:09.107 | FAIL: magnum.tests.objects.test_objects.TestObjectListBase.test_object_version_mappings
2015-01-21 10:08:09.107 | tags: worker-7
2015-01-21 10:08:09.107 | ----------------------------------------------------------------------
2015-01-21 10:08:09.107 | Traceback (most recent call last):
2015-01-21 10:08:09.107 | _StringException: Empty attachments:
2015-01-21 10:08:09.107 | stderr
2015-01-21 10:08:09.108 | stdout
2015-01-21 10:08:09.108 |
2015-01-21 10:08:09.108 | Traceback (most recent call last):
2015-01-21 10:08:09.108 | File "magnum/tests/objects/test_objects.py", line 539, in test_object_version_mappings
2015-01-21 10:08:09.108 | self._test_object_list_version_mappings(obj_class)
2015-01-21 10:08:09.108 | File "magnum/tests/objects/test_objects.py", line 523, in _test_object_list_version_mappings
2015-01-21 10:08:09.108 | item_obj_field = list_field._type._element_type
2015-01-21 10:08:09.108 | AttributeError: type object 'list' has no attribute '_type'
2015-01-21 10:08:09.108 |
2015-01-21 10:08:09.108 | Traceback (most recent call last):
2015-01-21 10:08:09.108 | _StringException: Empty attachments:
2015-01-21 10:08:09.108 | stderr
2015-01-21 10:08:09.109 | stdout
2015-01-21 10:08:09.109 |
2015-01-21 10:08:09.109 | Traceback (most recent call last):
2015-01-21 10:08:09.109 | File "magnum/tests/objects/test_objects.py", line 539, in test_object_version_mappings
2015-01-21 10:08:09.109 | self._test_object_list_version_mappings(obj_class)
2015-01-21 10:08:09.109 | File "magnum/tests/objects/test_objects.py", line 523, in _test_object_list_version_mappings
2015-01-21 10:08:09.109 | item_obj_field = list_field._type._element_type
2015-01-21 10:08:09.109 | AttributeError: type object 'list' has no attribute '_type'
2015-01-21 10:08:09.109 | Ran 432 tests in 0.875s
2015-01-21 10:08:09.109 | FAILED (id=0, failures=1)
2015-01-21 10:08:09.110 | error: testr failed (1)
2015-01-21 10:08:09.131 | ERROR: InvocationError: '/home/jenkins/workspace/gate-magnum-python27/.tox/py27/bin/python setup.py testr --slowest --testr-args='
2015-01-21 10:08:09.132 | ___________________________________ summary ____________________________________
2015-01-21 10:08:09.132 | ERROR: py27: commands failed

This seems one bug, need investigate why

Changed in magnum:
assignee: nobody → Jay Lau (jay-lau-513)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/149156

Changed in magnum:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/149156
Committed: https://git.openstack.org/cgit/stackforge/magnum/commit/?id=18b098043a8ea444bf569bc626d290d78c9db40e
Submitter: Jenkins
Branch: master

commit 18b098043a8ea444bf569bc626d290d78c9db40e
Author: Jay Lau (Guangya Liu) <email address hidden>
Date: Thu Jan 22 01:04:50 2015 -0500

    Rest back objects for test_objects

    When test_objects run, it will load some dummy objects such as Foo
    etc, the problem is that Foo did not have '_type' field, so the
    unit test will be failed.

    This patch was resetting objects for all test cases in test_objects.

    Closes-Bug: #1413144
    Implements part of bp increase-test-coverage

    Change-Id: I84067db21cb087c2694145a5a733d867422b73a5

Changed in magnum:
status: In Progress → Fix Committed
Adrian Otto (aotto)
Changed in magnum:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.