slo_test: make x-delete-after consistent in func test
Related-Change-Id: Ia1d8d9085bad5c6df744a4551eef9dcf56e6e261 Change-Id: I6c5bb824d7145c25faf37fd1fa575cedf05e499a
This commit is contained in:
@@ -501,10 +501,8 @@ class TestSlo(Base):
|
|||||||
self.assertEqual(resp.status, 201,
|
self.assertEqual(resp.status, 201,
|
||||||
"Response status is not 201: %s" % body)
|
"Response status is not 201: %s" % body)
|
||||||
|
|
||||||
def put_segments(url, token, parsed, conn, object_segments):
|
def put_segments(url, token, parsed, conn, object_segments,
|
||||||
now = int(time.time())
|
x_delete_after):
|
||||||
delete_time = now + 2
|
|
||||||
|
|
||||||
for objnum in range(len(object_segments)):
|
for objnum in range(len(object_segments)):
|
||||||
conn.request('PUT', '%s/%s/segments/%s' % (
|
conn.request('PUT', '%s/%s/segments/%s' % (
|
||||||
parsed.path,
|
parsed.path,
|
||||||
@@ -513,13 +511,13 @@ class TestSlo(Base):
|
|||||||
body=object_segments[objnum],
|
body=object_segments[objnum],
|
||||||
headers={
|
headers={
|
||||||
'X-Auth-Token': token,
|
'X-Auth-Token': token,
|
||||||
'X-Delete-At': delete_time})
|
'X-Delete-After': str(x_delete_after)})
|
||||||
resp = check_response(conn)
|
resp = check_response(conn)
|
||||||
body = resp.read()
|
body = resp.read()
|
||||||
self.assertEqual(resp.status, 201,
|
self.assertEqual(resp.status, 201,
|
||||||
"Response status is not 201: %s" % body)
|
"Response status is not 201: %s" % body)
|
||||||
|
|
||||||
retry(put_segments, segments)
|
retry(put_segments, segments, 2)
|
||||||
retry(put_manifest, segments, 1)
|
retry(put_manifest, segments, 1)
|
||||||
|
|
||||||
# get the manifest
|
# get the manifest
|
||||||
|
|||||||
Reference in New Issue
Block a user