aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests/test_transport_contracts.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/tests/test_transport_contracts.py')
-rw-r--r--packages/meshbay-hub/tests/test_transport_contracts.py9
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):