From 5ed3a41afa705aa821a69c174e5060024b20c5e2 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Mon, 16 Aug 2021 23:29:49 +0200 Subject: [PATCH] htop: use dummy package in tests --- tests/modules/programs/htop/empty-settings.nix | 3 +++ tests/modules/programs/htop/example-settings.nix | 3 +++ tests/modules/programs/htop/settings-without-fields.nix | 3 +++ 3 files changed, 9 insertions(+) diff --git a/tests/modules/programs/htop/empty-settings.nix b/tests/modules/programs/htop/empty-settings.nix index 8454e9a5b..ae4e437fd 100644 --- a/tests/modules/programs/htop/empty-settings.nix +++ b/tests/modules/programs/htop/empty-settings.nix @@ -6,6 +6,9 @@ with lib; config = { programs.htop.enable = true; + nixpkgs.overlays = + [ (self: super: { htop = pkgs.writeScriptBin "dummy" ""; }) ]; + nmt.script = '' assertPathNotExists home-files/.config/htop ''; diff --git a/tests/modules/programs/htop/example-settings.nix b/tests/modules/programs/htop/example-settings.nix index 8705e4b48..412b8c7d8 100644 --- a/tests/modules/programs/htop/example-settings.nix +++ b/tests/modules/programs/htop/example-settings.nix @@ -36,6 +36,9 @@ with lib; (text "Systemd") ]); + nixpkgs.overlays = + [ (self: super: { htop = pkgs.writeScriptBin "dummy" ""; }) ]; + nmt.script = '' htoprc=home-files/.config/htop/htoprc assertFileExists $htoprc diff --git a/tests/modules/programs/htop/settings-without-fields.nix b/tests/modules/programs/htop/settings-without-fields.nix index 19d3e81f1..7a6ebe8dc 100644 --- a/tests/modules/programs/htop/settings-without-fields.nix +++ b/tests/modules/programs/htop/settings-without-fields.nix @@ -7,6 +7,9 @@ with lib; programs.htop.enable = true; programs.htop.settings = { color_scheme = 6; }; + nixpkgs.overlays = + [ (self: super: { htop = pkgs.writeScriptBin "dummy" ""; }) ]; + # Test that the 'fields' key is written in addition to the customized # settings or htop won't read the options. nmt.script = ''