summary refs log tree commit diff
path: root/pkgs/applications/networking/seaweedfs/default.nix
diff options
context:
space:
mode:
authorArnout Engelen <arnout@bzzt.net>2021-05-06 10:08:08 +0200
committerArnout Engelen <arnout@bzzt.net>2021-05-07 09:53:35 +0200
commitb68130fd2cb836f80ee6c8eb8840c39a12c50bef (patch)
treeb600e65b2bc257a42dd5935f21c935e1a11feed3 /pkgs/applications/networking/seaweedfs/default.nix
parent39e6bf76474ce742eb027a88c4da6331f0a1526f (diff)
downloadnixpkgs-b68130fd2cb836f80ee6c8eb8840c39a12c50bef.tar
nixpkgs-b68130fd2cb836f80ee6c8eb8840c39a12c50bef.tar.gz
nixpkgs-b68130fd2cb836f80ee6c8eb8840c39a12c50bef.tar.bz2
nixpkgs-b68130fd2cb836f80ee6c8eb8840c39a12c50bef.tar.lz
nixpkgs-b68130fd2cb836f80ee6c8eb8840c39a12c50bef.tar.xz
nixpkgs-b68130fd2cb836f80ee6c8eb8840c39a12c50bef.tar.zst
nixpkgs-b68130fd2cb836f80ee6c8eb8840c39a12c50bef.zip
test-utilities: version test
Extract 'version test' to a reusable test utility as discussed in
https://github.com/NixOS/nixpkgs/pull/119636#issuecomment-826137021 and
Diffstat (limited to 'pkgs/applications/networking/seaweedfs/default.nix')
-rw-r--r--pkgs/applications/networking/seaweedfs/default.nix8
1 files changed, 3 insertions, 5 deletions
diff --git a/pkgs/applications/networking/seaweedfs/default.nix b/pkgs/applications/networking/seaweedfs/default.nix
index 61f318009f7..86a3e48ae8f 100644
--- a/pkgs/applications/networking/seaweedfs/default.nix
+++ b/pkgs/applications/networking/seaweedfs/default.nix
@@ -1,7 +1,7 @@
 { lib
 , fetchFromGitHub
 , buildGoModule
-, runCommand
+, testVersion
 , seaweedfs
 }:
 
@@ -20,10 +20,8 @@ buildGoModule rec {
 
   subPackages = [ "weed" ];
 
-  passthru.tests.check-version = runCommand "weed-version" { meta.timeout = 3; } ''
-    ${seaweedfs}/bin/weed version | grep -Fw ${version}
-    touch $out
-  '';
+  passthru.tests.version =
+    testVersion { package = seaweedfs; command = "weed version"; };
 
   meta = with lib; {
     description = "Simple and highly scalable distributed file system";