open-policy-agent: skip tests that require network

These tests do not work in the nix sandbox.
This commit is contained in:
teutat3s
2025-04-18 14:06:34 +02:00
committed by Gaetan Lepage
parent 79b9620e82
commit 982ec514ae
+18 -3
View File
@@ -43,9 +43,24 @@ buildGoModule rec {
) "opa_wasm"
);
checkFlags = lib.optionals (!enableWasmEval) [
"-skip=TestRegoTargetWasmAndTargetPluginDisablesIndexingTopdownStages"
];
checkFlags =
let
skippedTests =
[
# Skip tests that require network, not available in the nix sandbox
"TestInterQueryCache_ClientError"
"TestIntraQueryCache_ClientError"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# Skip tests that require network, not available in the darwin sandbox
"TestHTTPSClient"
"TestHTTPSNoClientCerts"
]
++ lib.optionals (!enableWasmEval) [
"TestRegoTargetWasmAndTargetPluginDisablesIndexingTopdownStages"
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
preCheck =
''