diff options
author | emilylange <git@emilylange.de> | 2024-04-10 16:06:56 +0200 |
---|---|---|
committer | emilylange <git@emilylange.de> | 2024-04-10 16:06:56 +0200 |
commit | 271fd55b7ecf4c5a7579a795d3d69519275a6c9f (patch) | |
tree | 45ac5f3039c614a559044530bb32b3bde241739d | |
parent | 8f95320f39d7e4e4a29ee70b8718974295a619f4 (diff) |
grafana-loki: add simple version test
v3.0.0 changed the ldflag prefix, which we rely on to pass and embed version information. This is likely to happen again, and such version test is incredibly inexpensive.
-rw-r--r-- | pkgs/servers/monitoring/loki/default.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/servers/monitoring/loki/default.nix b/pkgs/servers/monitoring/loki/default.nix index 176ec316a6ebb..0cf35895ca6ca 100644 --- a/pkgs/servers/monitoring/loki/default.nix +++ b/pkgs/servers/monitoring/loki/default.nix @@ -5,6 +5,8 @@ , makeWrapper , nixosTests , systemd +, testers +, grafana-loki }: buildGoModule rec { @@ -38,7 +40,13 @@ buildGoModule rec { --prefix LD_LIBRARY_PATH : "${lib.getLib systemd}/lib" ''; - passthru.tests = { inherit (nixosTests) loki; }; + passthru.tests = { + inherit (nixosTests) loki; + version = testers.testVersion { + command = "loki --version"; + package = grafana-loki; + }; + }; ldflags = let t = "github.com/grafana/loki/v3/pkg/util/build"; in [ "-s" |