cmcarthur opened a new pull request, #1455:
URL: https://github.com/apache/iceberg-rust/pull/1455
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases. You can
link an issue to this PR using the GitHub syntax. For example `Closes #123`
indicates that this PR will close issue #123.
-->
- Closes #1454.
## What changes are included in this PR?
<!--
Provide a summary of the modifications in this PR. List the main changes
such as new features, bug fixes, refactoring, or any other updates.
-->
- Adds `ExpireSnapshotsAction` with extensive test coverage
## Are these changes tested?
<!--
Specify what test covers (unit test, integration test, etc.).
If tests are not included in your PR, please explain why (for example, are
they covered by existing tests)?
-->
I've added the following unit tests covering the happy path logic in the
action:
- `test_builder_pattern`: unit test on the builder pattern
- `test_collect_files_to_delete_logic`: unit test on
`collect_files_to_delete`
- `test_default_configuration`: tests defaults on builder pattern
- `test_dry_run`: asserts that when `execute` is called in dry run mode, no
files are deleted and no transaction is generated or applied
The remaining tests setup various scenarios and call the full action to
ensure the correct commit is generated and applied, and the correct files are
deleted:
```
maintenance::expire_snapshots::tests::test_empty_snapshot_ids_list
maintenance::expire_snapshots::tests::test_expire_current_snapshot_error
maintenance::expire_snapshots::tests::test_expire_readonly_table_error
maintenance::expire_snapshots::tests::test_expire_snapshots_many_snapshots_retain_last
maintenance::expire_snapshots::tests::test_expire_snapshots_older_than_timestamp
maintenance::expire_snapshots::tests::test_expire_snapshots_one_snapshot
maintenance::expire_snapshots::tests::test_expire_snapshots_zero_snapshots
maintenance::expire_snapshots::tests::test_expire_specific_snapshot_ids
maintenance::expire_snapshots::tests::test_max_concurrent_deletes_configuration
maintenance::expire_snapshots::tests::test_nonexistent_snapshot_ids
maintenance::expire_snapshots::tests::test_retain_last_minimum_validation
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]