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

tests: ensure test runs after reaching retention period #911

Merged
merged 1 commit into from
Nov 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/system/test_bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ def test_bucket_w_retention_period(
buckets_to_delete,
blobs_to_delete,
):
period_secs = 10
period_secs = 3
bucket_name = _helpers.unique_name("w-retention-period")
bucket = _helpers.retry_429_503(storage_client.create_bucket)(bucket_name)
buckets_to_delete.append(bucket)
Expand Down Expand Up @@ -679,6 +679,8 @@ def test_bucket_w_retention_period(
assert not other.temporary_hold
assert other.retention_expiration_time is None

# Object can be deleted once it reaches the age defined in the retention policy.
_helpers.await_config_changes_propagate(sec=period_secs)
other.delete()
blobs_to_delete.pop()

Expand Down