Skip to content

s3tests: add tests for RestoreStatus in object listings#727

Merged
mheler merged 1 commit into
ceph:masterfrom
mheler:wip-list-restorestatus
May 20, 2026
Merged

s3tests: add tests for RestoreStatus in object listings#727
mheler merged 1 commit into
ceph:masterfrom
mheler:wip-list-restorestatus

Conversation

@mheler
Copy link
Copy Markdown
Contributor

@mheler mheler commented Mar 4, 2026

Add tests to validate the x-amz-optional-object-attributes RestoreStatus support in listing responses.

New tests:

  • test_list_objects_restore_status: validates RestoreStatus appears in list_objects and list_objects_v2 responses for temporarily restored objects, and is absent for normal objects or when the header is omitted
  • test_list_object_versions_restore_status: validates RestoreStatus appears for restored non-current versions while unrestored versions remain unaffected

Comment thread s3tests/functional/test_s3.py Outdated
assert len(objs) == 1
assert 'RestoreStatus' in objs[0]
assert objs[0]['RestoreStatus']['IsRestoreInProgress'] == False
assert 'RestoreExpiryDate' in objs[0]['RestoreStatus']
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a case for permanent restored objects too (that RestoreExpiryDate is not listed in the header) ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Please let me know if this looks right.

Add tests to validate the x-amz-optional-object-attributes RestoreStatus
support in listing responses.

New tests:
- test_list_objects_restore_status: validates RestoreStatus appears in
  list_objects and list_objects_v2 responses for temporarily restored
  objects, and is absent for normal objects or when the header is omitted
- test_list_object_versions_restore_status: validates RestoreStatus
  appears for restored non-current versions while unrestored versions
  remain unaffected

Signed-off-by: Matthew N. Heler <matthew.heler@hotmail.com>
@mheler mheler force-pushed the wip-list-restorestatus branch from 6bee867 to 48494a1 Compare May 12, 2026 11:32
@mheler mheler requested a review from soumyakoduri May 12, 2026 11:32
@soumyakoduri
Copy link
Copy Markdown
Contributor

@mheler mheler merged commit ff80f9e into ceph:master May 20, 2026
@mheler mheler deleted the wip-list-restorestatus branch May 20, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants