Remove transfer-encoding headers from test

The reason to remove the headers from this test is because urllib3
already add this header on the response. Prior urllib3 1.26.6 the header
is duplicated (one header from tempest, and one header from urllib
itself). Which it is fine according to RFC2616, however, from swift
perspective, it will fail if multiple headers are sent [1].
This issue doesn't happen with urllib3 > 1.26.5 because it checks if the
transfer-encoding header is already present, and doesn't add it [2].
This test is failing on tripleo side that uses urllib3 1.26.5, which is
in accordance with tempest requirements and upper constraints from
openstack, so, removing the headers here fix the problem.

1 - 5174b7f85d
2 - eb28aec79d

Change-Id: I418891d3a00e22effb394a553d8f40552da37713
Closes-Bug: #1982874
This commit is contained in:
Arx Cruz 2022-09-13 11:20:15 +02:00
parent 6ec23b64dc
commit 426bd31293
1 changed files with 0 additions and 2 deletions

View File

@ -186,12 +186,10 @@ class ObjectTest(base.BaseObjectTest):
"""Test creating object with transfer_encoding"""
object_name = data_utils.rand_name(name='TestObject')
data = data_utils.random_bytes(1024)
headers = {'Transfer-Encoding': 'chunked'}
resp, _ = self.object_client.create_object(
self.container_name,
object_name,
data=data_utils.chunkify(data, 512),
headers=headers,
chunked=True)
self.assertHeaders(resp, 'Object', 'PUT')