Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw/restore: s3tests to test restore object functionality #599

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shreyanshjain7174
Copy link

@shreyanshjain7174 shreyanshjain7174 commented Nov 4, 2024

This tests are added to tests temporary restore, permanent restore and read through restore object functionality, this includes zonegroup parameters and checks.

Signed-off-by: shreyanshjain7174 [email protected]

@soumyakoduri
Copy link
Contributor

these tests can be added to teuthology cloud-transition test-suite itself. It needs to be updated to handle restore params .

@shreyanshjain7174 please refer to d0ac12dc3864f92f452a38b722c5818e5c5d776f , f846f6ff020fb31baa1777c4e246abde62729ade to know what changes are needed in RGW test suites code.

@shreyanshjain7174 shreyanshjain7174 force-pushed the restore-s3tests branch 3 times, most recently from 1d413b8 to f4e3463 Compare January 7, 2025 14:13
s3tests_boto3/functional/test_s3.py Show resolved Hide resolved
assert response['ContentLength'] == len(data)

@pytest.mark.lifecycle_transition
@pytest.mark.cloud_transition
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could you mark these tests '@pytest.mark.cloud_restore' as well.

Copy link
Author

Choose a reason for hiding this comment

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

done

@shreyanshjain7174 shreyanshjain7174 force-pushed the restore-s3tests branch 2 times, most recently from ccc5228 to 5b946eb Compare January 8, 2025 16:29
time.sleep(2 * (restore_interval + lc_interval))

#verify object expired
verify_object(client, bucket, key, data, cloud_sc)
Copy link
Contributor

Choose a reason for hiding this comment

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

Just realized.. Does this check pass? Shouldn't data be empty here? for temporary restore since storage class wouldn't change, it may be better to check ContentLength ( '0') post expiration as well.

Same goes for read_through case too.

Copy link
Author

Choose a reason for hiding this comment

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

done directly checking for the data now in read through and temporary restore both

Copy link
Author

Choose a reason for hiding this comment

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

tests passing locally

This tests are added to tests temporary restore, permanent restore and
read through resotre object functionality, this includes zonegroup
parameters and checks.

Signed-off-by: shreyanshjain7174 <[email protected]>
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.

3 participants