Probe tests fail, as requests checks for strings.
The requests library checks that the headers are either strings or bytes. Currently, the two test_object_expirer tests fail with the message: InvalidHeader: Header value 1487879553 must be of type str or bytes, not <type 'int'> The header in question is "x-delete-at". The patch converts it to a string, before making a Swift Client request. Change-Id: I738697cb6b696f0e346345f75e0069048961f2ff
This commit is contained in:
1 changed files with 2 additions and 2 deletions
@@ -172,7 +172,7 @@ class TestObjectExpirer(ReplProbeTest):
now = time.time()
delete_at = int(now + 2.0)
recreate_at = delete_at + 1.0
put_object(headers={'X-Delete-At': delete_at,
put_object(headers={'X-Delete-At': str(delete_at),
'X-Timestamp': Timestamp(now).normal})
# some object servers stopped to make a situation that the
@@ -255,7 +255,7 @@ class TestObjectExpirer(ReplProbeTest):
obj_brain.stop_primary_half()
now = time.time()
delete_at = int(now + 2.0)
obj_brain.put_object({'X-Delete-At': delete_at})
obj_brain.put_object({'X-Delete-At': str(delete_at)})
# make sure auto-created containers get in the account listing
Manager(['container-updater']).once()
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.