kubevpn: fix tests on sandboxed darwin

Signed-off-by: Paul Meyer <katexochen0@gmail.com>
This commit is contained in:
Paul Meyer
2025-07-29 09:39:27 +02:00
parent 845dba9218
commit 0dbbc74788
+20 -4
View File
@@ -1,5 +1,6 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
go,
@@ -32,10 +33,25 @@ buildGoModule rec {
export HOME=$(mktemp -d)
'';
# Disable network tests
checkFlags = [
"-skip=^Test(Route|Functions|ByDumpClusterInfo|ByCreateSvc|Elegant)$"
];
checkFlags =
let
skippedTests = [
# Disable network tests
"TestRoute"
"TestFunctions"
"TestByDumpClusterInfo"
"TestByCreateSvc"
"TestElegant"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# Not sure why these test fail on darwin with __darwinAllowLocalNetworking.
"TestHttpOverUnix"
"TestConnectionRefuse"
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
__darwinAllowLocalNetworking = true;
doInstallCheck = true;