feat: add file upload integration tests and dependencies#36
feat: add file upload integration tests and dependencies#36AndriiS-DevBrother wants to merge 4 commits into
Conversation
a2a22a0 to
c6ea15f
Compare
NazarY-DevBrother
left a comment
There was a problem hiding this comment.
LG2M, 2 small comments:
| ) | ||
|
|
||
|
|
||
| def _download_file(node: Node, file_hash: str, offset: int = 0, |
There was a problem hiding this comment.
test_file_upload.py:_download_file — This helper accesses client._deploy_stub.downloadFile(...) directly, bypassing the public download_file() method from pyf1r3fly. Consider extending download_file() in PR #4 to accept timeout and grpc_options, so the integration test can use the public API instead of reaching into private internals.
There was a problem hiding this comment.
Done! Updated the integration test to securely use the newly expanded client.download_file() SDK method with the timeout parameter from pyf1r3fly PR #4, so we no longer bypass the public API here. I've also updated the poetry lock to capture that.
| f1r3node: | ||
| url: git@github.com:F1R3FLY-io/f1r3node.git | ||
| branch: dev | ||
| branch: feature/streaming-file-upload-registry |
There was a problem hiding this comment.
f1r3node branch is changed from dev to feature/streaming-file-upload-registry. This is fine for testing, but should be reverted to dev (or the target merge branch) before merging this PR, otherwise CI will break when the feature branch is deleted.
f1b2096 to
c6ea15f
Compare
spreston8
left a comment
There was a problem hiding this comment.
_wait_for_finalization (line 118) calls node.is_finalized(block_hash) but this method does not exist on the Node class. Only node.last_finalized_block() is available (returns the LFB as BlockInfo).
Options to fix:
- Add an
is_finalized(block_hash)method toNodewrapping the gRPCisFinalizedcall - Rewrite
_wait_for_finalizationto polllast_finalized_block()and check ifblockNumber >= target_block_number
This will fail at runtime as-is.
Co-Authored-By: Claude noreply@anthropic.com
Reposting as comment instead of request-changes
spreston8
left a comment
There was a problem hiding this comment.
_wait_for_finalization (line 118) calls node.is_finalized(block_hash) but this method does not exist on the Node class. Only node.last_finalized_block() is available (returns the LFB as BlockInfo).
Options to fix:
- Add an
is_finalized(block_hash)method toNodewrapping the gRPCisFinalizedcall - Rewrite
_wait_for_finalizationto polllast_finalized_block()and check ifblockNumber >= target_block_number
This will fail at runtime as-is.
Co-Authored-By: Claude noreply@anthropic.com
oops, forgot to commit this change 😕 |
- Add test_file_upload.py with cross-node replication tests - Update poetry.lock and pyproject.toml with new dependencies - Update services.yml configuration
a6164ed to
3ab45c8
Compare
Summary
Add end-to-end file upload/download integration tests that verify the full cross-node pipeline across real Docker nodes.
New test suite —
test_file_upload.pyCross-node replication E2E test covering:
Uses the session-scoped shard fixture with heartbeat-driven block creation.
Dependencies