aboutsummaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorJade Lovelace <lix@jade.fyi>2024-05-29 20:41:22 -0700
committerJade Lovelace <lix@jade.fyi>2024-05-29 20:41:22 -0700
commit285bc67318e2ee4b69b13eb0b8e7b202fc287c51 (patch)
treee448bf615ace52582dfbf08c0099a94e67fc54bb /tests/unit
parent562ff516ab27b8e98490646dd30ac96e7e2c36bb (diff)
tests/filetransfer: reënable on Darwin
Since we put __darwinAllowLocalNetworking in our derivation in I752b81c85ebeaab4e582ac01c239d69d65580f37, this stuff will just work fine. I checked our derivation works on the darwin community builder. Change-Id: I40e3a801d6bb38efede79af4aded65c1e1f57cec
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/libstore/filetransfer.cc14
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/unit/libstore/filetransfer.cc b/tests/unit/libstore/filetransfer.cc
index 0e5c0965e..b74d01516 100644
--- a/tests/unit/libstore/filetransfer.cc
+++ b/tests/unit/libstore/filetransfer.cc
@@ -13,14 +13,6 @@
#include <thread>
#include <unistd.h>
-// 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 {
@@ -150,7 +142,7 @@ TEST(FileTransfer, exceptionAbortsDownload)
}
}
-TEST(FileTransfer, NOT_ON_DARWIN(reportsSetupErrors))
+TEST(FileTransfer, reportsSetupErrors)
{
auto [port, srv] = serveHTTP("404 not found", "", [] { return ""; });
auto ft = makeFileTransfer();
@@ -159,7 +151,7 @@ TEST(FileTransfer, NOT_ON_DARWIN(reportsSetupErrors))
FileTransferError);
}
-TEST(FileTransfer, NOT_ON_DARWIN(reportsTransferError))
+TEST(FileTransfer, reportsTransferError)
{
auto [port, srv] = serveHTTP("200 ok", "content-length: 100\r\n", [] {
std::this_thread::sleep_for(10ms);
@@ -171,7 +163,7 @@ TEST(FileTransfer, NOT_ON_DARWIN(reportsTransferError))
ASSERT_THROW(ft->download(req), FileTransferError);
}
-TEST(FileTransfer, NOT_ON_DARWIN(handlesContentEncoding))
+TEST(FileTransfer, handlesContentEncoding)
{
std::string original = "Test data string";
std::string compressed = compress("gzip", original);