hub: Add test

wip/yesman
Tim Steinbach 3 years ago committed by Tim Steinbach
parent 0576111e8a
commit 4c9414d31c
  1. 1
      nixos/tests/all-tests.nix
  2. 17
      nixos/tests/git/hub.nix
  3. 4
      pkgs/applications/version-management/git-and-tools/hub/default.nix

@ -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 {};

@ -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…
Cancel
Save