From 66d72d90bb42a4129e7200910f24412ee10d0489 Mon Sep 17 00:00:00 2001 From: Julien Jerphanion Date: Thu, 23 Jan 2025 17:43:42 +0100 Subject: [PATCH] Relax test for now Signed-off-by: Julien Jerphanion --- libmamba/tests/src/download/test_downloader.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/libmamba/tests/src/download/test_downloader.cpp b/libmamba/tests/src/download/test_downloader.cpp index e5d0977cb5..612a1732f5 100644 --- a/libmamba/tests/src/download/test_downloader.cpp +++ b/libmamba/tests/src/download/test_downloader.cpp @@ -81,8 +81,20 @@ namespace mamba auto certificates = context.remote_fetch_params.ssl_verify; const fs::u8path root_prefix = detail::get_root_prefix(); - auto expected_certificates = root_prefix / "ssl" / "cacert.pem"; - REQUIRE(certificates == expected_certificates); + const fs::u8path expected_certificates = root_prefix / "ssl" / "cert.pem"; + + // TODO: is libmamba tested without a root prefix or a base installation? + bool reach_fallback_certificates; + if (util::on_win) + { + // Default certificates from libcurl/libssl are used on Windows + reach_fallback_certificates = certificates == ""; + } + else + { + reach_fallback_certificates = (mamba::util::ends_with(certificates, "cert.pem") || mamba::util::ends_with(certificates, "ca-certificates.crt")); + } + REQUIRE((certificates == expected_certificates || reach_fallback_certificates)); } } }