yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #71732
[Bug 1751551] Re: broken test in Py 3.6: SAMLGenerationTests.test_sign_assertion_exc
Reviewed: https://review.openstack.org/553712
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=4a1df081fd3868a75bfabe8099025069eb42248f
Submitter: Zuul
Branch: master
commit 4a1df081fd3868a75bfabe8099025069eb42248f
Author: wangxiyuan <wangxiyuan@xxxxxxxxxx>
Date: Fri Mar 16 16:07:09 2018 +0800
Fix assert test error under py3.6
The function __str__ of class subprocess.CalledProcessError
is different between py3.6 and lower python version.
py3.6: Command '%s' returned non-zero exit status %d.
lower version: Command '%s' returned non-zero exit status %d
There is a . in py3.6.
This patch fix the assert error under py3.6
Change-Id: I19ae5711ed7440791583940fa4a8fb770dcdc933
Closes-bug: #1751551
** Changed in: keystone
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1751551
Title:
broken test in Py 3.6: SAMLGenerationTests.test_sign_assertion_exc
Status in OpenStack Identity (keystone):
Fix Released
Bug description:
While building Keystone in Debian Sid + Python 3.6, I get the below
stack dump. Obviously, this is a broken test, not a broken code.
Notice the final . (ie: dot) after "status 1" that is the cause of the
test failure.
Everything else seems to pass in my environment.
keystone.tests.unit.test_v3_federation.SAMLGenerationTests.test_sign_assertion_exc
----------------------------------------------------------------------------------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
b'Traceback (most recent call last):'
b' File "/usr/lib/python3/dist-packages/mock/mock.py", line 1305, in patched'
b' return func(*args, **keywargs)'
b' File "/home/zigo/sources/openstack/queens/services/keystone/build-area/keystone-13.0.0~rc1/keystone/tests/unit/test_v3_federation.py", line 4049, in test_sign_assertion_exc'
b' self.assertEqual(expected_log, logger_fixture.output)'
b' File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 411, in assertEqual'
b' self.assertThat(observed, matcher, message)'
b' File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 498, in assertThat'
b' raise mismatch_error'
b'testtools.matchers._impl.MismatchError: !=:'
b"reference = '''\\"
b"Error when signing assertion, reason: Command 'xmlsec1' returned non-zero exit status 1 keystone.tests.unit.test_v3_federation.SAMLGenerationTests.test_sign_assertion_exc-1"
b"'''"
b"actual = '''\\"
b"Error when signing assertion, reason: Command 'xmlsec1' returned non-zero exit status 1. keystone.tests.unit.test_v3_federation.SAMLGenerationTests.test_sign_assertion_exc-1"
b"'''"
b''
b''
To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1751551/+subscriptions
References