Add workaround for OSError raised by Popen.communicate()
Python 2.6 can raise OSError when too much data is
written to STDIN and the process died prematurely.
In the case of keystoneclient this happens during
the first cms_verify() call of a process. The calling
logic expects a useful error message in order to
refetch the CA or singing CERT, which is missing in the
case of an OSError. So just fake it instead.
Add basic unit tests to cover all of the public methods from
keystone.common.cms, raising test coverage to 77%. Add
unit test for this specific bug (test_cms_verify_token_no_oserror).
Reviewed: https:/ /review. openstack. org/33851 github. com/openstack/ python- keystoneclient/ commit/ 07a7c3102c684ba a8b364f419c9e9b 6c18360f5e
Committed: http://
Submitter: Jenkins
Branch: master
commit 07a7c3102c684ba a8b364f419c9e9b 6c18360f5e
Author: Dirk Mueller <email address hidden>
Date: Thu Jun 20 18:49:26 2013 +0200
Add workaround for OSError raised by Popen.communicate()
Python 2.6 can raise OSError when too much data is
written to STDIN and the process died prematurely.
In the case of keystoneclient this happens during
the first cms_verify() call of a process. The calling
logic expects a useful error message in order to
refetch the CA or singing CERT, which is missing in the
case of an OSError. So just fake it instead.
Add basic unit tests to cover all of the public methods from common. cms, raising test coverage to 77%. Add verify_ token_no_ oserror) .
keystone.
unit test for this specific bug (test_cms_
Closes-Bug: LP Bug#1235252
Change-Id: I6e650ab9494c60 5b4e41c78c87a95 05e09d5fc29