From 533d469875b25d6b5ba54086bc1ab4cd8dad39ab Mon Sep 17 00:00:00 2001 From: jade Date: Thu, 30 May 2024 21:38:32 +0000 Subject: =?UTF-8?q?Revert=20"tests/filetransfer:=20re=C3=ABnable=20on=20Da?= =?UTF-8?q?rwin"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 285bc67318e2ee4b69b13eb0b8e7b202fc287c51. Reason for revert: https://git.lix.systems/lix-project/lix/issues/364 For some reason this broke `main` even though the change we are reverting passed CI! Mysterious, haunted, etc. Needs more debugging, let's turn it off for now. Change-Id: Ica4819d61cd35b83eb52985bfcb657e858f025a9 --- tests/unit/libstore/filetransfer.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/unit/libstore/filetransfer.cc b/tests/unit/libstore/filetransfer.cc index b74d01516..0e5c0965e 100644 --- a/tests/unit/libstore/filetransfer.cc +++ b/tests/unit/libstore/filetransfer.cc @@ -13,6 +13,14 @@ #include #include +// local server tests don't work on darwin without some incantations +// the horrors do not want to look up. contributions welcome though! +#if __APPLE__ +#define NOT_ON_DARWIN(n) DISABLED_##n +#else +#define NOT_ON_DARWIN(n) n +#endif + using namespace std::chrono_literals; namespace { @@ -142,7 +150,7 @@ TEST(FileTransfer, exceptionAbortsDownload) } } -TEST(FileTransfer, reportsSetupErrors) +TEST(FileTransfer, NOT_ON_DARWIN(reportsSetupErrors)) { auto [port, srv] = serveHTTP("404 not found", "", [] { return ""; }); auto ft = makeFileTransfer(); @@ -151,7 +159,7 @@ TEST(FileTransfer, reportsSetupErrors) FileTransferError); } -TEST(FileTransfer, reportsTransferError) +TEST(FileTransfer, NOT_ON_DARWIN(reportsTransferError)) { auto [port, srv] = serveHTTP("200 ok", "content-length: 100\r\n", [] { std::this_thread::sleep_for(10ms); @@ -163,7 +171,7 @@ TEST(FileTransfer, reportsTransferError) ASSERT_THROW(ft->download(req), FileTransferError); } -TEST(FileTransfer, handlesContentEncoding) +TEST(FileTransfer, NOT_ON_DARWIN(handlesContentEncoding)) { std::string original = "Test data string"; std::string compressed = compress("gzip", original); -- cgit v1.2.3