🐛 Fix media-remote-test falling back to real config in REPL

The info-service-uri-not-configured test used config-get-mock with an
empty map, which falls back to cf/config for missing keys. In a REPL
with real config, media-processing-service-uri is set, causing the code
to attempt an HTTP call instead of raising the expected error.

Use (constantly nil) to ensure cf/get always returns nil, matching the
test intent of simulating an unconfigured service URI.

AI-assisted-by: mimo-v2.5
This commit is contained in:
Andrey Antukh 2026-08-06 16:50:10 +00:00
parent 1548748aed
commit 9875db2f82

View File

@ -99,7 +99,7 @@
(t/deftest info-service-uri-not-configured
(t/testing "info throws when service URI is not configured"
(with-redefs [cf/get (th/config-get-mock {})]
(with-redefs [cf/get (constantly nil)]
(let [path (th/tempfile "backend_tests/test_files/sample.jpg")
err (ex/try! (media.remote/process (mk-system)
{:cmd :info :input {:path path :mtype "image/jpeg"}}))]