🐛 Use multipart helper in jobs upload-chunk test

The multipart-only upload guard rejects the :content map sent by
upload-chunked! over plain command!. Send it through
multipart-command! like the other upload tests; forged-path tests
stay on plain command!.

AI-assisted-by: muse-spark-1.3-contributor
This commit is contained in:
Andrey Antukh 2026-10-17 21:53:29 +00:00
parent b633093336
commit 49aeeb053b

View File

@ -249,17 +249,17 @@
::rpc/profile-id (:id profile)
:total-chunks 1})
:result :session-id)
out (th/command! {::th/type :upload-chunk
::rpc/profile-id (:id profile)
:session-id session-id
:index 0
:content (if (some? path)
(let [size (.length (jio/file path))]
{:filename "package.penpot"
:path path
:mtype "application/zip"
:size size})
(upload-chunk :content content))})]
out (th/multipart-command! {::th/type :upload-chunk
::rpc/profile-id (:id profile)
:session-id session-id
:index 0
:content (if (some? path)
(let [size (.length (jio/file path))]
{:filename "package.penpot"
:path path
:mtype "application/zip"
:size size})
(upload-chunk :content content))})]
(t/is (nil? (:error out)))
session-id))