From 38453b10b10359ae577807101b93ce35e872bf24 Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski <2151333+piotrkwiecinski@users.noreply.github.com> Date: Sat, 19 Apr 2025 23:21:00 +0200 Subject: [PATCH] nixosTests.hub: migrate to runTest Part of #386873 --- nixos/tests/all-tests.nix | 2 +- nixos/tests/git/hub.nix | 34 ++++++++++++++++------------------ 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 27cda8ba09f2..6f5cd36c726e 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -636,7 +636,7 @@ in home-assistant = runTest ./home-assistant.nix; hostname = handleTest ./hostname.nix { }; hound = handleTest ./hound.nix { }; - hub = handleTest ./git/hub.nix { }; + hub = runTest ./git/hub.nix; hydra = runTest ./hydra; i3wm = handleTest ./i3wm.nix { }; icingaweb2 = runTest ./icingaweb2.nix; diff --git a/nixos/tests/git/hub.nix b/nixos/tests/git/hub.nix index 43ae2b7ab30b..622f4b6dac05 100644 --- a/nixos/tests/git/hub.nix +++ b/nixos/tests/git/hub.nix @@ -1,20 +1,18 @@ -import ../make-test-python.nix ( - { pkgs, ... }: - { - name = "hub"; - meta = with pkgs.lib.maintainers; { - maintainers = [ nequissimus ]; +{ pkgs, ... }: +{ + name = "hub"; + meta = with pkgs.lib.maintainers; { + maintainers = [ nequissimus ]; + }; + + nodes.hub = + { pkgs, ... }: + { + environment.systemPackages = [ pkgs.hub ]; }; - nodes.hub = - { pkgs, ... }: - { - 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") - ''; - } -) + 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") + ''; +}