Files
Nexus/tests/test_sync_batch_id.py
T
Nexus Deploy a2ae74d582 release: BUG fixes batch 1-6, full bug scan docs, Ubuntu/Linux dev
- Backend: auth refresh reuse, schedule/retry/sync/agent/files fixes
- Frontend: push WS, files ETag browse, vite build assets
- Docs: audit/changelog, production deploy gate, bug scan registry B7-77
- Deploy: deploy-production.sh, prune assets, gate logs
2026-06-04 14:01:14 +08:00

25 lines
589 B
Python

"""Client-supplied push batch_id for WebSocket progress before POST."""
import pytest
from server.api.schemas import SyncFiles
def test_sync_files_accepts_client_batch_id():
bid = "abc123def456"
payload = SyncFiles(
server_ids=[1],
source_path="/tmp/nexus_upload_test",
batch_id=bid,
)
assert payload.batch_id == bid
def test_sync_files_rejects_invalid_batch_id():
with pytest.raises(ValueError):
SyncFiles(
server_ids=[1],
source_path="/tmp/nexus_upload_test",
batch_id="not-hex-id",
)