Fixed max payload size error

Functional tests were erroring out with the positive case for max payload
size. I removed the content type and content encoding to resolve this
issue. The test should pass as expected now

Change-Id: I4a905a2ac23716a56791889132cc2607ac449440
This commit is contained in:
Chellygel
2015-03-16 17:41:45 -05:00
parent 44b045bfbd
commit 28e8c7f758
2 changed files with 4 additions and 6 deletions

View File

@@ -32,7 +32,7 @@ if os.path.exists('./etc/functional_tests.conf'):
class TestCase(oslotest.BaseTestCase):
max_payload_size = CONF.keymanager.max_payload_size
max_sized_payload = 'a' * max_payload_size
max_sized_payload = u'a' * max_payload_size
oversized_payload = 'a' * (max_payload_size + 1)
max_field_size = 255
max_sized_field = 'a' * max_field_size

View File

@@ -26,9 +26,7 @@ secret_create_defaults_data = {
"algorithm": "aes",
"bit_length": 256,
"mode": "cbc",
"payload": "gF6+lLoF3ohA9aPRpt+6bQ==",
"payload_content_type": "application/octet-stream",
"payload_content_encoding": "base64",
"payload": "gF6+lLoF3ohA9aPRpt+6bQ=="
}
secret_create_nones_data = {
@@ -262,6 +260,7 @@ class SecretsTestCase(base.TestCase):
@testcase.attr('positive')
def test_secret_create_defaults_valid_payload(self, payload):
"""Create secrets with a various valid payloads."""
test_model = self.behaviors.create_secret(secret_create_defaults_data)
test_model.payload = payload
@@ -269,8 +268,7 @@ class SecretsTestCase(base.TestCase):
self.assertIsNotNone(secret_ref)
get_resp = self.behaviors.get_secret(secret_ref)
self.assertEqual(test_model.payload,
str(base64.b64encode(get_resp.payload)))
self.assertEqual(test_model.payload, get_resp.payload)
@utils.parameterized_dataset({
'array': [['boom']],