Avoid broken http header including white space
The execution result header in user metadata looks invalid and it cuases the hang in the func CI tessting. So let's remove the dangerous white space in the http header key with this patch. The skip test removed in this patch has been since https://review.opendev.org/#/c/693549 . The skipping purpose was to progress py3 migration (we'd like to find any other issues than this at the time) so the test is still worth, then this fix enables to pass the test. Change-Id: Ib41735d8801f0c99ed0563213dcf414fefb5cbb2
This commit is contained in:
parent
b0c939fe24
commit
b4af2b12b6
StorletSamples/java/IdentityStorlet/src/org/openstack/storlet/identity
tests/functional/java
@ -129,7 +129,7 @@ public class IdentityStorlet implements IStorlet {
|
||||
* add execution invocation result to out md
|
||||
*/
|
||||
if (bExecute == true) {
|
||||
md.put("Execution result", Integer.toString(nExitCode));
|
||||
md.put("Execution-Result", Integer.toString(nExitCode));
|
||||
}
|
||||
/*
|
||||
* Copy parameters into out md
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
import os
|
||||
import random
|
||||
import six
|
||||
import string
|
||||
from swiftclient import client as c
|
||||
from nose.plugins.attrib import attr
|
||||
@ -75,7 +74,7 @@ class TestIdentityStorlet(StorletJavaFunctionalTest):
|
||||
processed_c += chunk
|
||||
|
||||
if params is not None and params.get('execute', None) is not None:
|
||||
mdv = processed_h['X-Object-Meta-Execution result'.lower()]
|
||||
mdv = processed_h['X-Object-Meta-Execution-Result'.lower()]
|
||||
self.assertEqual('42', mdv)
|
||||
if params is not None and params.get('double', None) == 'true':
|
||||
self.assertEqual(original_c, processed_c[:file_length])
|
||||
@ -112,7 +111,7 @@ class TestIdentityStorlet(StorletJavaFunctionalTest):
|
||||
assert(uploaded_c == saved_c)
|
||||
|
||||
if params is not None and params.get('execute', None) is not None:
|
||||
mdv = resp_headers['X-Object-Meta-Execution result'.lower()]
|
||||
mdv = resp_headers['X-Object-Meta-Execution-Result'.lower()]
|
||||
self.assertEqual('42', mdv)
|
||||
|
||||
self.assertEqual(random_md,
|
||||
@ -153,7 +152,6 @@ class TestIdentityStorlet(StorletJavaFunctionalTest):
|
||||
def test_put(self):
|
||||
self.invoke_storlet('PUT')
|
||||
|
||||
@unittest.skipIf(six.PY3, 'execute can hang on py3 for some reason')
|
||||
def test_put_execute(self):
|
||||
self.invoke_storlet('PUT', {'execute': 'true'})
|
||||
self.invoke_storlet('PUT', {'execute': 'true'},
|
||||
@ -172,7 +170,6 @@ class TestIdentityStorlet(StorletJavaFunctionalTest):
|
||||
self.invoke_storlet('GET', {'double': 'true'},
|
||||
header_parameters=True)
|
||||
|
||||
@unittest.skipIf(six.PY3, 'execute can hang on py3 for some reason')
|
||||
def test_get_execute(self):
|
||||
self.invoke_storlet('GET', {'execute': 'true'})
|
||||
self.invoke_storlet('GET', {'execute': 'true'},
|
||||
|
Loading…
x
Reference in New Issue
Block a user