diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-15 22:55:25 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-15 22:55:25 +0200 |
| commit | 1f84c047914cf21df1a1de196d990d193539523d (patch) | |
| tree | a818f18127af96349b6f3da8c53212c324672b60 /packages/meshbay-hub/tests/test_transport_contracts.py | |
| parent | 459fc93e98f23e326c2fa77fe86ba74c2bae77f0 (diff) | |
| download | meshbay-1f84c047914cf21df1a1de196d990d193539523d.tar.gz | |
feat(hub): drop files and folders onto Files to upload them
Into the folder on screen, under the Upload button's rule. A name already
there, or one the node would refuse, cancels the whole drop with a message.
Folders are recreated level by level; files go out a few at a time. The
in-flight upload guard is keyed by folder and name.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/tests/test_transport_contracts.py')
| -rw-r--r-- | packages/meshbay-hub/tests/test_transport_contracts.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/meshbay-hub/tests/test_transport_contracts.py b/packages/meshbay-hub/tests/test_transport_contracts.py index d13cfd4..c10f183 100644 --- a/packages/meshbay-hub/tests/test_transport_contracts.py +++ b/packages/meshbay-hub/tests/test_transport_contracts.py @@ -332,9 +332,12 @@ def test_uploads_are_tracked_per_upload(transport): """Acks interleave when two files are in flight.""" assert "this._uploaders = new Map()" in transport assert "this._uploaders.set(uploadId" in transport - # And the "already being uploaded" guard still speaks in filenames, because - # that is what the caller passed and what it would recognise in the error. - assert "this._inFlightUploads.has(file.name)" in transport + # The "already being uploaded" guard is keyed by folder and name, as the + # node's own upload state is: a dropped folder can hold two files of one name. + assert "const inFlightKey = `${dir || ''}/${file.name}`;" in transport + assert "this._inFlightUploads.has(inFlightKey)" in transport + # And its error still speaks in the filename the caller would recognise. + assert "`${file.name} is already being uploaded`" in transport def test_the_upload_itself_is_sealed(transport): |