Fixing the broken functional tests
Adding creator_id for Secret and Order types Adding sub_status and sub_status_message for Order types This is a result of these attributes being added to the API. This change isn't aimed to support these fields, but rather just accepts the data so that it won't bork the tests. Actual support for using these fields should be addressed in a follow-up patch. Fixes bug 1441848 Change-Id: I2340b7dd1dae3806418fa99bdaad73860dda5fbc
This commit is contained in:
parent
a7709dc2c9
commit
f0fe464dd3
|
@ -89,12 +89,16 @@ class Order(object):
|
|||
|
||||
def __init__(self, api, type, status=None, created=None, updated=None,
|
||||
meta=None, order_ref=None, error_status_code=None,
|
||||
error_reason=None):
|
||||
error_reason=None, sub_status=None, sub_status_message=None,
|
||||
creator_id=None):
|
||||
super(Order, self).__init__()
|
||||
|
||||
self._api = api
|
||||
self._type = type
|
||||
self._status = status
|
||||
self._sub_status = sub_status
|
||||
self._sub_status_message = sub_status_message
|
||||
self._creator_id = creator_id
|
||||
|
||||
if created:
|
||||
self._created = parse_isotime(created)
|
||||
|
@ -218,7 +222,8 @@ class KeyOrder(Order, KeyOrderFormatter):
|
|||
def __init__(self, api, name=None, algorithm=None, bit_length=None,
|
||||
mode=None, expiration=None, payload_content_type=None,
|
||||
status=None, created=None, updated=None, order_ref=None,
|
||||
secret_ref=None, error_status_code=None, error_reason=None):
|
||||
secret_ref=None, error_status_code=None, error_reason=None,
|
||||
sub_status=None, sub_status_message=None, creator_id=None):
|
||||
super(KeyOrder, self).__init__(
|
||||
api, self._type, status=status, created=created, updated=updated,
|
||||
meta={
|
||||
|
@ -226,7 +231,8 @@ class KeyOrder(Order, KeyOrderFormatter):
|
|||
'expiration': expiration,
|
||||
'payload_content_type': payload_content_type
|
||||
}, order_ref=order_ref, error_status_code=error_status_code,
|
||||
error_reason=error_reason)
|
||||
error_reason=error_reason, sub_status=sub_status,
|
||||
sub_status_message=sub_status_message, creator_id=creator_id)
|
||||
self._secret_ref = secret_ref
|
||||
if mode:
|
||||
self._meta['mode'] = mode
|
||||
|
@ -259,8 +265,8 @@ class AsymmetricOrder(Order, AsymmetricOrderFormatter):
|
|||
def __init__(self, api, name=None, algorithm=None, bit_length=None,
|
||||
pass_phrase=None, expiration=None, payload_content_type=None,
|
||||
status=None, created=None, updated=None, order_ref=None,
|
||||
container_ref=None, error_status_code=None,
|
||||
error_reason=None):
|
||||
container_ref=None, error_status_code=None, error_reason=None,
|
||||
sub_status=None, sub_status_message=None, creator_id=None):
|
||||
super(AsymmetricOrder, self).__init__(
|
||||
api, self._type, status=status, created=created, updated=updated,
|
||||
meta={
|
||||
|
@ -268,7 +274,8 @@ class AsymmetricOrder(Order, AsymmetricOrderFormatter):
|
|||
'expiration': expiration,
|
||||
'payload_content_type': payload_content_type
|
||||
}, order_ref=order_ref, error_status_code=error_status_code,
|
||||
error_reason=error_reason)
|
||||
error_reason=error_reason, sub_status=sub_status,
|
||||
sub_status_message=sub_status_message, creator_id=creator_id)
|
||||
self._container_ref = container_ref
|
||||
if pass_phrase:
|
||||
self._meta['pass_phrase'] = pass_phrase
|
||||
|
|
|
@ -82,7 +82,8 @@ class Secret(SecretFormatter):
|
|||
bit_length=None, mode=None, payload=None,
|
||||
payload_content_type=None, payload_content_encoding=None,
|
||||
secret_ref=None, created=None, updated=None,
|
||||
content_types=None, status=None, secret_type=None):
|
||||
content_types=None, status=None, secret_type=None,
|
||||
creator_id=None):
|
||||
"""
|
||||
Secret objects should not be instantiated directly. You should use
|
||||
the `create` or `get` methods of the
|
||||
|
@ -102,7 +103,8 @@ class Secret(SecretFormatter):
|
|||
created=created,
|
||||
updated=updated,
|
||||
content_types=content_types,
|
||||
status=status
|
||||
status=status,
|
||||
creator_id=creator_id
|
||||
)
|
||||
|
||||
@property
|
||||
|
@ -320,7 +322,8 @@ class Secret(SecretFormatter):
|
|||
bit_length=None, mode=None, payload=None,
|
||||
payload_content_type=None,
|
||||
payload_content_encoding=None, created=None,
|
||||
updated=None, content_types=None, status=None):
|
||||
updated=None, content_types=None, status=None,
|
||||
creator_id=None):
|
||||
self._name = name
|
||||
self._algorithm = algorithm
|
||||
self._bit_length = bit_length
|
||||
|
@ -328,6 +331,7 @@ class Secret(SecretFormatter):
|
|||
self._payload = payload
|
||||
self._payload_content_encoding = payload_content_encoding
|
||||
self._expiration = expiration
|
||||
self._creator_id = creator_id
|
||||
if self._expiration:
|
||||
self._expiration = parse_isotime(self._expiration)
|
||||
if self._secret_ref:
|
||||
|
|
|
@ -17,5 +17,8 @@
|
|||
# Install packages from test-requirements.txt
|
||||
sudo pip install -r /opt/stack/new/python-barbicanclient/test-requirements.txt
|
||||
|
||||
# Make sure we're running the trunk client before we run the tests
|
||||
sudo pip install -U /opt/stack/new/python-barbicanclient
|
||||
|
||||
cd /opt/stack/new/python-barbicanclient/functionaltests
|
||||
sudo ./run_tests.sh
|
||||
|
|
Loading…
Reference in New Issue