tests: add option test.stubs
This option provides a more convenient way to overlay dummy packages. It also adds a function `config.lib.test.mkStubPackage` that can, e.g., be used for `package` options.
This commit is contained in:
parent
b0651cc217
commit
cb09a968e9
159 changed files with 753 additions and 981 deletions
|
|
@ -17,8 +17,7 @@ with lib;
|
|||
programs.neomutt.enable = true;
|
||||
programs.neomutt.changeFolderWhenSourcingAccount = false;
|
||||
|
||||
nixpkgs.overlays =
|
||||
[ (self: super: { neomutt = pkgs.writeScriptBin "dummy-neomutt" ""; }) ];
|
||||
test.stubs.neomutt = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/neomutt/hm@example.com
|
||||
|
|
|
|||
|
|
@ -13,8 +13,7 @@ with lib;
|
|||
|
||||
programs.neomutt.enable = true;
|
||||
|
||||
nixpkgs.overlays =
|
||||
[ (self: super: { neomutt = pkgs.writeScriptBin "dummy-neomutt" ""; }) ];
|
||||
test.stubs.neomutt = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/neomutt/neomuttrc
|
||||
|
|
|
|||
|
|
@ -50,8 +50,7 @@ with lib;
|
|||
];
|
||||
};
|
||||
|
||||
nixpkgs.overlays =
|
||||
[ (self: super: { neomutt = pkgs.writeScriptBin "dummy-neomutt" ""; }) ];
|
||||
test.stubs.neomutt = { };
|
||||
|
||||
test.asserts.warnings.expected = [
|
||||
"Specifying 'programs.neomutt.(binds|macros).map' as a string is deprecated, use a list of strings instead. See https://github.com/nix-community/home-manager/pull/1885."
|
||||
|
|
|
|||
|
|
@ -50,8 +50,7 @@ with lib;
|
|||
];
|
||||
};
|
||||
|
||||
nixpkgs.overlays =
|
||||
[ (self: super: { neomutt = pkgs.writeScriptBin "dummy-neomutt" ""; }) ];
|
||||
test.stubs.neomutt = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/neomutt/neomuttrc
|
||||
|
|
|
|||
|
|
@ -16,8 +16,7 @@ with lib; {
|
|||
|
||||
programs.neomutt.enable = true;
|
||||
|
||||
nixpkgs.overlays =
|
||||
[ (self: super: { neomutt = pkgs.writeScriptBin "dummy-neomutt" ""; }) ];
|
||||
test.stubs.neomutt = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/neomutt/neomuttrc
|
||||
|
|
|
|||
|
|
@ -21,8 +21,7 @@ with lib;
|
|||
|
||||
programs.neomutt.enable = true;
|
||||
|
||||
nixpkgs.overlays =
|
||||
[ (self: super: { neomutt = pkgs.writeScriptBin "dummy-neomutt" ""; }) ];
|
||||
test.stubs.neomutt = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/neomutt/neomuttrc
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@ with lib;
|
|||
vimKeys = false;
|
||||
};
|
||||
|
||||
nixpkgs.overlays =
|
||||
[ (self: super: { neomutt = pkgs.writeScriptBin "dummy-neomutt" ""; }) ];
|
||||
test.stubs.neomutt = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/neomutt/neomuttrc
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ with lib;
|
|||
vimKeys = false;
|
||||
};
|
||||
|
||||
nixpkgs.overlays =
|
||||
[ (self: super: { neomutt = pkgs.writeScriptBin "dummy-neomutt" ""; }) ];
|
||||
test.stubs.neomutt = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/neomutt/neomuttrc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue