diff --git a/pkgs/by-name/op/open-policy-agent/package.nix b/pkgs/by-name/op/open-policy-agent/package.nix index c076679fef2a..2285ad4b44c2 100644 --- a/pkgs/by-name/op/open-policy-agent/package.nix +++ b/pkgs/by-name/op/open-policy-agent/package.nix @@ -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 = ''