nixosTests.hub: migrate to runTest

Part of #386873
This commit is contained in:
Piotr Kwiecinski 2025-04-19 23:21:00 +02:00
parent ad5abbcfad
commit 38453b10b1
No known key found for this signature in database
GPG key ID: EC0DE1CB9D5258B4
2 changed files with 17 additions and 19 deletions

View file

@ -636,7 +636,7 @@ in
home-assistant = runTest ./home-assistant.nix; home-assistant = runTest ./home-assistant.nix;
hostname = handleTest ./hostname.nix { }; hostname = handleTest ./hostname.nix { };
hound = handleTest ./hound.nix { }; hound = handleTest ./hound.nix { };
hub = handleTest ./git/hub.nix { }; hub = runTest ./git/hub.nix;
hydra = runTest ./hydra; hydra = runTest ./hydra;
i3wm = handleTest ./i3wm.nix { }; i3wm = handleTest ./i3wm.nix { };
icingaweb2 = runTest ./icingaweb2.nix; icingaweb2 = runTest ./icingaweb2.nix;

View file

@ -1,20 +1,18 @@
import ../make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{ name = "hub";
name = "hub"; meta = with pkgs.lib.maintainers; {
meta = with pkgs.lib.maintainers; { maintainers = [ nequissimus ];
maintainers = [ nequissimus ]; };
nodes.hub =
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.hub ];
}; };
nodes.hub = testScript = ''
{ pkgs, ... }: assert "git version ${pkgs.git.version}\nhub version ${pkgs.hub.version}\n" in hub.succeed("hub version")
{ assert "These GitHub commands are provided by hub" in hub.succeed("hub help")
environment.systemPackages = [ pkgs.hub ]; '';
}; }
testScript = ''
assert "git version ${pkgs.git.version}\nhub version ${pkgs.hub.version}\n" in hub.succeed("hub version")
assert "These GitHub commands are provided by hub" in hub.succeed("hub help")
'';
}
)