From a6eb533c99c606112467378dc35db7d6cdb2f713 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 16 Oct 2026 07:55:20 +0000 Subject: [PATCH] :bug: Adapt admin export to new binfile API and fix stale tests The jobs-refactor base inlined the binfile adapters: export-files! takes the frozen cfg as its single argument, ::bfc/ids is now ::bfc/file-ids and the stream travels as ::bfc/output. The admin export command and its test helper still used the old two-arg call. The export dialog rework also carries :size on the download artifact, so the two stale expectations in exports-files-test now include it. AI-assisted-by: muse-spark-1.3 --- backend/src/app/rpc/admin/file.clj | 5 +++-- backend/test/backend_tests/rpc_admin_file_test.clj | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/backend/src/app/rpc/admin/file.clj b/backend/src/app/rpc/admin/file.clj index 7dca95e09c..853c0ef80d 100644 --- a/backend/src/app/rpc/admin/file.clj +++ b/backend/src/app/rpc/admin/file.clj @@ -353,10 +353,11 @@ (let [path (tmp/tempfile :prefix "penpot.export." :min-age "30m")] (with-open [output (io/output-stream path)] (-> cfg - (assoc ::bfc/ids (set file-ids)) + (assoc ::bfc/file-ids (set file-ids)) (assoc ::bfc/embed-assets (boolean embedassets)) (assoc ::bfc/include-libraries (boolean includelibs)) - (bf.v3/export-files! output))) + (assoc ::bfc/output output) + (bf.v3/export-files!))) (if clone (let [profile (profile/get-profile pool profile-id) diff --git a/backend/test/backend_tests/rpc_admin_file_test.clj b/backend/test/backend_tests/rpc_admin_file_test.clj index 471ef751a0..3dc5ed0cec 100644 --- a/backend/test/backend_tests/rpc_admin_file_test.clj +++ b/backend/test/backend_tests/rpc_admin_file_test.clj @@ -425,10 +425,11 @@ (let [path (tmp/tempfile :prefix "penpot.import-test." :min-age "30m")] (with-open [output (io/output-stream path)] (-> th/*system* - (assoc ::bfc/ids #{file-id}) + (assoc ::bfc/file-ids #{file-id}) (assoc ::bfc/embed-assets false) (assoc ::bfc/include-libraries false) - (bf.v3/export-files! output))) + (assoc ::bfc/output output) + (bf.v3/export-files!))) path)) (t/deftest export-anonymous-rejected