mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
hub: Add test
This commit is contained in:
parent
0576111e8a
commit
4c9414d31c
@ -158,6 +158,7 @@ in
|
||||
home-assistant = handleTest ./home-assistant.nix {};
|
||||
hostname = handleTest ./hostname.nix {};
|
||||
hound = handleTest ./hound.nix {};
|
||||
hub = handleTest ./git/hub.nix {};
|
||||
hydra = handleTest ./hydra {};
|
||||
i3wm = handleTest ./i3wm.nix {};
|
||||
icingaweb2 = handleTest ./icingaweb2.nix {};
|
||||
|
17
nixos/tests/git/hub.nix
Normal file
17
nixos/tests/git/hub.nix
Normal file
@ -0,0 +1,17 @@
|
||||
import ../make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "hub";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ nequissimus ];
|
||||
};
|
||||
|
||||
nodes.hub = { pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [ pkgs.gitAndTools.hub ];
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
assert "git version ${pkgs.git.version}\nhub version ${pkgs.gitAndTools.hub.version}\n" in hub.succeed("hub version")
|
||||
assert "These GitHub commands are provided by hub" in hub.succeed("hub help")
|
||||
'';
|
||||
})
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, buildGoPackage, fetchFromGitHub, git, groff, installShellFiles, util-linux }:
|
||||
{ stdenv, buildGoPackage, fetchFromGitHub, git, groff, installShellFiles, util-linux, nixosTests }:
|
||||
|
||||
buildGoPackage rec {
|
||||
pname = "hub";
|
||||
@ -35,6 +35,8 @@ buildGoPackage rec {
|
||||
installManPage share/man/man[1-9]/*.[1-9]
|
||||
'';
|
||||
|
||||
passthru.tests = { inherit (nixosTests) hub; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Command-line wrapper for git that makes you better at GitHub";
|
||||
license = licenses.mit;
|
||||
|
Loading…
Reference in New Issue
Block a user