Unit test failure building Newton b2 in debian

Bug #1603753 reported by Thomas Goirand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
senlin
Expired
Undecided
Unassigned

Bug Description

I experienced the below unit test failures when buildng Senlin Debian package for Newton b2. Note that it only happens in Sid + Experimental, it seems to build well in Jessie.

======================================================================
FAIL: senlin.tests.unit.test_common_context.TestRequestContext.test_request_context_from_dict
senlin.tests.unit.test_common_context.TestRequestContext.test_request_context_from_dict
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''
  pythonlogging:'eventlet'
  pythonlogging:'fasteners'
  pythonlogging:'jsonpath_rw'
  pythonlogging:'keystoneauth'
  pythonlogging:'migrate'
  pythonlogging:'object'
  pythonlogging:'openstack'
  pythonlogging:'oslo'
  pythonlogging:'oslo_concurrency'
  pythonlogging:'oslo_config'
  pythonlogging:'oslo_db'
  pythonlogging:'oslo_i18n'
  pythonlogging:'oslo_log'
  pythonlogging:'oslo_messaging'
  pythonlogging:'oslo_middleware'
  pythonlogging:'oslo_policy'
  pythonlogging:'oslo_service'
  pythonlogging:'oslo_utils'
  pythonlogging:'oslo_versionedobjects'
  pythonlogging:'requests'
  pythonlogging:'routes'
  pythonlogging:'sqlalchemy'
  pythonlogging:'stevedore'
  pythonlogging:'urllib3'

Traceback (most recent call last):
  File "senlin/tests/unit/test_common_context.py", line 82, in test_request_context_from_dict
    self.assertEqual(self.ctx, ctx_dict)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = {'auth_token': '123',
 'auth_token_info': {'123info': 'woop'},
 'auth_url': 'http://xyz',
 'domain': 'domain-id',
 'domain_name': 'this domain',
 'is_admin': False,
 'is_admin_project': True,
 'password': 'foo',
 'project': 'project-id',
 'project_domain': 'project-domain-id',
 'project_domain_name': 'a project domain',
 'project_name': 'a project',
 'read_only': False,
 'region_name': 'regionOne',
 'roles': ['arole', 'notadmin'],
 'show_deleted': False,
 'trusts': None,
 'user': 'fooUser',
 'user_domain': 'user-domain',
 'user_domain_name': 'user-domain-name',
 'user_name': 'mick'}
actual = {'auth_token': '123',
 'auth_token_info': {'123info': 'woop'},
 'auth_url': 'http://xyz',
 'domain': 'domain-id',
 'domain_name': 'this domain',
 'is_admin': False,
 'password': 'foo',
 'project': 'project-id',
 'project_domain': 'project-domain-id',
 'project_domain_name': 'a project domain',
 'project_name': 'a project',
 'read_only': False,
 'region_name': 'regionOne',
 'roles': ['arole', 'notadmin'],
 'show_deleted': False,
 'trusts': None,
 'user': 'fooUser',
 'user_domain': 'user-domain',
 'user_domain_name': 'user-domain-name',
 'user_name': 'mick'}

======================================================================
FAIL: senlin.tests.unit.test_common_context.TestRequestContext.test_request_context_init
senlin.tests.unit.test_common_context.TestRequestContext.test_request_context_init
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''
  pythonlogging:'eventlet'
  pythonlogging:'fasteners'
  pythonlogging:'jsonpath_rw'
  pythonlogging:'keystoneauth'
  pythonlogging:'migrate'
  pythonlogging:'object'
  pythonlogging:'openstack'
  pythonlogging:'oslo'
  pythonlogging:'oslo_concurrency'
  pythonlogging:'oslo_config'
  pythonlogging:'oslo_db'
  pythonlogging:'oslo_i18n'
  pythonlogging:'oslo_log'
  pythonlogging:'oslo_messaging'
  pythonlogging:'oslo_middleware'
  pythonlogging:'oslo_policy'
  pythonlogging:'oslo_service'
  pythonlogging:'oslo_utils'
  pythonlogging:'oslo_versionedobjects'
  pythonlogging:'requests'
  pythonlogging:'routes'
  pythonlogging:'sqlalchemy'
  pythonlogging:'stevedore'
  pythonlogging:'urllib3'

Traceback (most recent call last):
  File "senlin/tests/unit/test_common_context.py", line 73, in test_request_context_init
    self.assertEqual(self.ctx, ctx_dict)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = {'auth_token': '123',
 'auth_token_info': {'123info': 'woop'},
 'auth_url': 'http://xyz',
 'domain': 'domain-id',
 'domain_name': 'this domain',
 'is_admin': False,
 'is_admin_project': True,
 'password': 'foo',
 'project': 'project-id',
 'project_domain': 'project-domain-id',
 'project_domain_name': 'a project domain',
 'project_name': 'a project',
 'read_only': False,
 'region_name': 'regionOne',
 'roles': ['arole', 'notadmin'],
 'show_deleted': False,
 'trusts': None,
 'user': 'fooUser',
 'user_domain': 'user-domain',
 'user_domain_name': 'user-domain-name',
 'user_name': 'mick'}
actual = {'auth_token': '123',
 'auth_token_info': {'123info': 'woop'},
 'auth_url': 'http://xyz',
 'domain': 'domain-id',
 'domain_name': 'this domain',
 'is_admin': False,
 'password': 'foo',
 'project': 'project-id',
 'project_domain': 'project-domain-id',
 'project_domain_name': 'a project domain',
 'project_name': 'a project',
 'read_only': False,
 'region_name': 'regionOne',
 'roles': ['arole', 'notadmin'],
 'show_deleted': False,
 'trusts': None,
 'user': 'fooUser',
 'user_domain': 'user-domain',
 'user_domain_name': 'user-domain-name',
 'user_name': 'mick'}

======================================================================
FAIL: senlin.tests.unit.test_common_context.TestRequestContext.test_request_context_update
senlin.tests.unit.test_common_context.TestRequestContext.test_request_context_update
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''
  pythonlogging:'eventlet'
  pythonlogging:'fasteners'
  pythonlogging:'jsonpath_rw'
  pythonlogging:'keystoneauth'
  pythonlogging:'migrate'
  pythonlogging:'object'
  pythonlogging:'openstack'
  pythonlogging:'oslo'
  pythonlogging:'oslo_concurrency'
  pythonlogging:'oslo_config'
  pythonlogging:'oslo_db'
  pythonlogging:'oslo_i18n'
  pythonlogging:'oslo_log'
  pythonlogging:'oslo_messaging'
  pythonlogging:'oslo_middleware'
  pythonlogging:'oslo_policy'
  pythonlogging:'oslo_service'
  pythonlogging:'oslo_utils'
  pythonlogging:'oslo_versionedobjects'
  pythonlogging:'requests'
  pythonlogging:'routes'
  pythonlogging:'sqlalchemy'
  pythonlogging:'stevedore'
  pythonlogging:'urllib3'

Traceback (most recent call last):
  File "senlin/tests/unit/test_common_context.py", line 88, in test_request_context_update
    self.assertEqual(self.ctx.get(k), ctx.to_dict().get(k))
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: True != None

----------------------------------------------------------------------
Ran 1838 tests in 158.513s

FAILED (failures=3)
debian/rules:30: recipe for target 'override_dh_auto_test' failed
make[1]: *** [override_dh_auto_test] Error 1
make[1]: Leaving directory '/home/zigo/sources/openstack/newton/senlin/build-area/senlin-2.0.0~b2'
debian/rules:13: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

Revision history for this message
Qiming Teng (tengqim) wrote :

this looks like a version problem of the oslo.context package. Newer oslo.context package has added an 'is_admin_project' property. Senlin has been doing a very strict testing of the properties it is using.
A patch has been proposed here which has a more forward friendly testing implementation: https://review.openstack.org/#/c/342869/

Revision history for this message
Thomas Goirand (thomas-goirand) wrote :
Download full text (4.8 KiB)

After applying this patch, I still have issues:

======================================================================
FAIL: senlin.tests.unit.test_common_context.TestRequestContext.test_request_context_from_dict
senlin.tests.unit.test_common_context.TestRequestContext.test_request_context_from_dict
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''
  pythonlogging:'eventlet'
  pythonlogging:'fasteners'
  pythonlogging:'jsonpath_rw'
  pythonlogging:'keystoneauth'
  pythonlogging:'migrate'
  pythonlogging:'object'
  pythonlogging:'openstack'
  pythonlogging:'oslo'
  pythonlogging:'oslo_concurrency'
  pythonlogging:'oslo_config'
  pythonlogging:'oslo_db'
  pythonlogging:'oslo_i18n'
  pythonlogging:'oslo_log'
  pythonlogging:'oslo_messaging'
  pythonlogging:'oslo_middleware'
  pythonlogging:'oslo_policy'
  pythonlogging:'oslo_service'
  pythonlogging:'oslo_utils'
  pythonlogging:'oslo_versionedobjects'
  pythonlogging:'requests'
  pythonlogging:'routes'
  pythonlogging:'sqlalchemy'
  pythonlogging:'stevedore'
  pythonlogging:'urllib3'

Traceback (most recent call last):
  File "senlin/tests/unit/test_common_context.py", line 66, in test_request_context_from_dict
    self.assertEqual(self.ctx, ctx_dict)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = {'auth_token_info': {'123info': 'woop'},
 'auth_url': 'http://xyz',
 'domain_name': 'this domain',
 'is_admin': False,
 'password': 'foo',
 'project': 'project-id',
 'project_domain_name': 'a project domain',
 'project_name': 'a project',
 'region_name': 'regionOne',
 'trusts': None,
 'user_domain_name': 'user-domain-name',
 'user_name': 'mick'}
actual = {'auth_token': None,
 'auth_token_info': {'123info': 'woop'},
 'auth_url': 'http://xyz',
 'domain': None,
 'domain_name': 'this domain',
 'is_admin': False,
 'password': 'foo',
 'project': 'project-id',
 'project_domain': None,
 'project_domain_name': 'a project domain',
 'project_name': 'a project',
 'read_only': False,
 'region_name': 'regionOne',
 'roles': [],
 'show_deleted': False,
 'trusts': None,
 'user': None,
 'user_domain': None,
 'user_domain_name': 'user-domain-name',
 'user_name': 'mick'}

======================================================================
FAIL: senlin.tests.unit.test_common_context.TestRequestContext.test_request_context_init
senlin.tests.unit.test_common_context.TestRequestContext.test_request_context_init
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''
  pythonlogging:'eventlet'
  pythonlogging:'fasteners'
  pythonlogging:'jsonpath_rw'
  pythonlogging:'keystoneauth'
  pythonlogging:'migrate'
  pythonlogging:'object'
  pythonlogging:'openstack'
  pythonlogging:'oslo'
  pythonlogging:'oslo_concurrency'
  pythonlogging:'oslo_config'
  pythonlogging:'oslo_db'
  pythonlogging:'oslo_i18n'
  pythonlogging:'osl...

Read more...

Revision history for this message
Qiming Teng (tengqim) wrote :

hi, Thomas, have you applied this patch as well? https://review.openstack.org/#/c/342367/

Qiming Teng (tengqim)
Changed in senlin:
status: New → Incomplete
summary: - Unit test failure buildnig Newton b2 in debian
+ Unit test failure building Newton b2 in debian
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for senlin because there has been no activity for 60 days.]

Changed in senlin:
status: Incomplete → Expired
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.