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
|
|
@ -92,11 +92,7 @@ with lib;
|
|||
};
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
i3status-rust = pkgs.writeScriptBin "dummy-i3status-rust" "";
|
||||
})
|
||||
];
|
||||
test.stubs.i3status-rust = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/i3status-rust/config-custom.toml
|
||||
|
|
|
|||
|
|
@ -6,11 +6,7 @@ with lib;
|
|||
config = {
|
||||
programs.i3status-rust = { enable = true; };
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
i3status-rust = pkgs.writeScriptBin "dummy-i3status-rust" "";
|
||||
})
|
||||
];
|
||||
test.stubs.i3status-rust = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/i3status-rust/config-default.toml
|
||||
|
|
|
|||
|
|
@ -102,11 +102,7 @@ with lib;
|
|||
};
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
i3status-rust = pkgs.writeScriptBin "dummy-i3status-rust" "";
|
||||
})
|
||||
];
|
||||
test.stubs.i3status-rust = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/i3status-rust/config-extra-settings.toml
|
||||
|
|
|
|||
|
|
@ -52,11 +52,7 @@ with lib;
|
|||
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
i3status-rust = pkgs.writeScriptBin "dummy-i3status-rust" "";
|
||||
})
|
||||
];
|
||||
test.stubs.i3status-rust = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/i3status-rust/config-top.toml
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue