rambleraptor commented on code in PR #3649:
URL: https://github.com/apache/iceberg-python/pull/3649#discussion_r3739452001
##########
tests/table/test_manage_snapshots.py:
##########
@@ -177,3 +183,234 @@ def
test_set_current_snapshot_chained_with_create_tag(table_v2: Table) -> None:
# The main branch should point to the same snapshot as the tag
main_update = next(u for u in set_ref_updates if u.ref_name == "main")
assert main_update.snapshot_id == snapshot_one
+
+
+def test_fast_forward_branch_advances_to_descendant(table_v2: Table) -> None:
+ parent_snapshot_id = 3051729675574597004
+ child_snapshot_id = 3055729675574597004
+
+ # Create a lagging branch at the parent snapshot, then reset the mock so
+ # the next commit's updates are the fast-forward alone.
+ table_v2.catalog = MagicMock()
+ table_v2.catalog.commit_table.return_value =
_mock_commit_response(table_v2)
Review Comment:
You should inject in the ref directly here like you do in other tests
(preserve_retention_fields)
```
table_v2.metadata.refs["lagging"] = SnapshotRef(
snapshot_id=parent_snapshot_id,
snapshot_ref_type="branch",
)
```
--
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]