fix: use json.dumps(paths) for getinfo multi-path, delete probe script

DSM accepts multiple paths as a JSON array string, not comma-separated.
Comma-separated is treated as a single literal path; repeated path[]
params return error 400. Confirmed via test_getinfo_multipath.py.

- get_info: path param changed from ",".join(paths) to json.dumps(paths)
- tests: update multi-path assertion to expect JSON array format

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-14 09:32:11 +02:00
parent a96a3d460d
commit 1bccf1e5d2
3 changed files with 4 additions and 124 deletions
+3 -2
View File
@@ -2,6 +2,7 @@
from __future__ import annotations
import json
from unittest.mock import AsyncMock, MagicMock
import pytest
@@ -369,9 +370,9 @@ async def test_get_info_multiple_paths(config: AppConfig) -> None:
assert "/data/b.txt" in result
assert "2 item(s)" in result
# Verify the API received both paths as a comma-joined string
# Verify the API received paths as a JSON array (confirmed working format)
call_params = client.request.call_args[1]["params"]
assert call_params["path"] == "/dev/a.txt,/data/b.txt"
assert call_params["path"] == json.dumps(["/dev/a.txt", "/data/b.txt"])
@pytest.mark.asyncio