metricbeat7: fix passthru.tests

This commit is contained in:
Thomas Gerbet 2023-02-06 18:28:27 +01:00 committed by Artturin
parent 273297d84b
commit 66444200f4

View file

@ -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;
lib.optionalAttrs config.allowUnfree (
assert metricbeat7.drvPath == nixosTests.elk.unfree.ELK-7.elkPackages.metricbeat.drvPath;
{
elk = nixosTests.elk.ELK-7;
};
elk = nixosTests.elk.unfree.ELK-7;
}
);
};
packetbeat7 = beat "packetbeat" {
buildInputs = [ libpcap ];