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.
This commit is contained in:
parent
8f95320f39
commit
271fd55b7e
1 changed files with 9 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue