summary refs log tree commit diff
path: root/pkgs/misc/logging
diff options
context:
space:
mode:
authorThomas Gerbet <thomas@gerbet.me>2023-02-06 18:28:27 +0100
committerArtturin <Artturin@artturin.com>2023-02-06 22:01:39 +0200
commit66444200f4946c6ca30f2fb138358f668ec71521 (patch)
tree9f5ff352de013a302f800dc765b5ed707c8980a3 /pkgs/misc/logging
parent273297d84bbbe3e6d1ceac0214649f9792c51937 (diff)
downloadnixpkgs-66444200f4946c6ca30f2fb138358f668ec71521.tar
nixpkgs-66444200f4946c6ca30f2fb138358f668ec71521.tar.gz
nixpkgs-66444200f4946c6ca30f2fb138358f668ec71521.tar.bz2
nixpkgs-66444200f4946c6ca30f2fb138358f668ec71521.tar.lz
nixpkgs-66444200f4946c6ca30f2fb138358f668ec71521.tar.xz
nixpkgs-66444200f4946c6ca30f2fb138358f668ec71521.tar.zst
nixpkgs-66444200f4946c6ca30f2fb138358f668ec71521.zip
metricbeat7: fix `passthru.tests`
Diffstat (limited to 'pkgs/misc/logging')
-rw-r--r--pkgs/misc/logging/beats/7.x.nix12
1 files changed, 7 insertions, 5 deletions
diff --git a/pkgs/misc/logging/beats/7.x.nix b/pkgs/misc/logging/beats/7.x.nix
index a2a7e796916..b5f812d002c 100644
--- a/pkgs/misc/logging/beats/7.x.nix
+++ b/pkgs/misc/logging/beats/7.x.nix
@@ -1,4 +1,4 @@
-{ lib, fetchFromGitHub, elk7Version, buildGoModule, libpcap, nixosTests, systemd }:
+{ lib, fetchFromGitHub, elk7Version, buildGoModule, libpcap, nixosTests, systemd, config }:
 
 let beat = package: extraArgs: buildGoModule (rec {
   pname = package;
@@ -36,10 +36,12 @@ rec {
   metricbeat7 = beat "metricbeat" {
     meta.description = "Lightweight shipper for metrics";
     passthru.tests =
-      assert metricbeat7.drvPath == nixosTests.elk.ELK-7.elkPackages.metricbeat.drvPath;
-      {
-        elk = nixosTests.elk.ELK-7;
-      };
+      lib.optionalAttrs config.allowUnfree (
+        assert metricbeat7.drvPath == nixosTests.elk.unfree.ELK-7.elkPackages.metricbeat.drvPath;
+        {
+          elk = nixosTests.elk.unfree.ELK-7;
+        }
+      );
   };
   packetbeat7 = beat "packetbeat" {
     buildInputs = [ libpcap ];