Add a link versioned object document

If the test 'test_objects' fails, it is handy to display the link
to the versioned object document, which help contributors to
understand the version bumping policy.

Change-Id: I88d25281f5a1d5e28ba4e2dd813a3b4ad5ce881a
Closes-Bug: #1491855
This commit is contained in:
Hongbin Lu 2015-09-13 17:55:48 -04:00
parent d470d46bb0
commit f2a9ff59b5
2 changed files with 5 additions and 3 deletions

View File

@ -58,7 +58,7 @@ This results in a unit test failure with the following output::
testtools.matchers._impl.MismatchError: !=:
reference = {'Container': '1.0-e12affbba5f8a748882a3ae98aced282'}
actual = {'Container': '1.0-22b40e8eed0414561ca921906b189820'}
: Fields or remotable methods in some objects have changed. Make sure the versions of the objects has been bumped, and update the hashes in the static fingerprints tree (object_data).
: Fields or remotable methods in some objects have changed. Make sure the versions of the objects has been bumped, and update the hashes in the static fingerprints tree (object_data). For more information, read http://docs.openstack.org/developer/magnum/objects.html.
This is an indication that me adding the 'foo' field to Container means I need
to bump the version of Container, so I increase the version and add a comment
@ -77,7 +77,7 @@ tell me the fingerprint that I now need to put in the static tree::
testtools.matchers._impl.MismatchError: !=:
reference = {'Container': '1.0-e12affbba5f8a748882a3ae98aced282'}
actual = {'Container': '1.1-22b40e8eed0414561ca921906b189820'}
: Fields or remotable methods in some objects have changed. Make sure the versions of the objects has been bumped, and update the hashes in the static fingerprints tree (object_data).
: Fields or remotable methods in some objects have changed. Make sure the versions of the objects has been bumped, and update the hashes in the static fingerprints tree (object_data). For more information, read http://docs.openstack.org/developer/magnum/objects.html.
I can now copy the new fingerprint needed (1.1-22b40e8eed0414561ca921906b189820),
to the object_data map within magnum/tests/unit/objects/test_objects.py::

View File

@ -450,7 +450,9 @@ class TestObjectVersions(test_base.TestCase):
"Fields or remotable methods in some objects have "
"changed. Make sure the versions of the objects has "
"been bumped, and update the hashes in the static "
"fingerprints tree (object_data).")
"fingerprints tree (object_data). For more "
"information, read http://docs.openstack.org/"
"developer/magnum/objects.html.")
class TestObjectSerializer(test_base.TestCase):