a2ae74d582
- 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
25 lines
589 B
Python
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",
|
|
)
|