lol

Merge: prometheus-redis-exporter: enable tests (#423591)

authored by

Maximilian Bosch and committed by
GitHub
e8c6803d f61b0902

+28 -2
+28 -2
pkgs/servers/monitoring/prometheus/redis-exporter.nix
··· 3 3 buildGoModule, 4 4 fetchFromGitHub, 5 5 nixosTests, 6 + 7 + # Test dependencies 8 + redisTestHook, 6 9 }: 7 10 8 11 buildGoModule rec { ··· 24 27 "-X main.BuildDate=unknown" 25 28 ]; 26 29 27 - # needs a redis server 28 - doCheck = false; 30 + nativeCheckInputs = [ 31 + redisTestHook 32 + ]; 33 + 34 + preCheck = '' 35 + export TEST_REDIS_URI="redis://localhost:6379" 36 + ''; 37 + 38 + __darwinAllowLocalNetworking = true; 39 + 40 + checkFlags = 41 + let 42 + skippedTests = [ 43 + "TestLatencySpike" # timing-sensitive 44 + 45 + # The following tests require ad-hoc generated TLS certificates in the source dir. 46 + # This is not possible in the read-only Nix store. 47 + "TestCreateClientTLSConfig" 48 + "TestValkeyTLSScheme" 49 + "TestCreateServerTLSConfig" 50 + "TestGetServerCertificateFunc" 51 + "TestGetConfigForClientFunc" 52 + ]; 53 + in 54 + [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ]; 29 55 30 56 passthru.tests = { inherit (nixosTests.prometheus-exporters) redis; }; 31 57