tests: clean up tests
- Move all module tests to their own directories. - Avoid duplication of `// import`.
This commit is contained in:
parent
fba87f8998
commit
de8033747c
|
@ -11,44 +11,44 @@ let
|
|||
sha256 = "1qr1shhapjn4nnd4k6hml69ri8vgz4l8lakjll5hc516shs9a9nn";
|
||||
};
|
||||
|
||||
modules = import ../modules/modules.nix { inherit lib pkgs; check = false; };
|
||||
modules = import ../modules/modules.nix {
|
||||
inherit lib pkgs;
|
||||
check = false;
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
import nmt {
|
||||
inherit lib pkgs modules;
|
||||
testedAttrPath = [ "home" "activationPackage" ];
|
||||
tests = {
|
||||
browserpass = ./modules/programs/browserpass.nix;
|
||||
mbsync = ./modules/programs/mbsync.nix;
|
||||
texlive-minimal = ./modules/programs/texlive-minimal.nix;
|
||||
xresources = ./modules/xresources.nix;
|
||||
}
|
||||
// pkgs.lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux (
|
||||
{
|
||||
getmail = ./modules/programs/getmail.nix;
|
||||
i3-keybindings = ./modules/services/window-managers/i3-keybindings.nix;
|
||||
}
|
||||
// import ./modules/misc/pam
|
||||
// import ./modules/misc/xdg
|
||||
// import ./modules/misc/xsession
|
||||
// import ./modules/programs/firefox
|
||||
// import ./modules/programs/neomutt
|
||||
// import ./modules/programs/rofi
|
||||
// import ./modules/services/sxhkd
|
||||
// import ./modules/systemd
|
||||
)
|
||||
// import ./lib/types
|
||||
// import ./modules/files
|
||||
// import ./modules/home-environment
|
||||
// import ./modules/misc/fontconfig
|
||||
// import ./modules/programs/alacritty
|
||||
// import ./modules/programs/bash
|
||||
// import ./modules/programs/git
|
||||
// import ./modules/programs/gpg
|
||||
// import ./modules/programs/newsboat
|
||||
// import ./modules/programs/readline
|
||||
// import ./modules/programs/ssh
|
||||
// import ./modules/programs/tmux
|
||||
// import ./modules/programs/zsh;
|
||||
tests = builtins.foldl' (a: b: a // (import b)) { } ([
|
||||
./lib/types
|
||||
./modules/files
|
||||
./modules/home-environment
|
||||
./modules/misc/fontconfig
|
||||
./modules/programs/alacritty
|
||||
./modules/programs/bash
|
||||
./modules/programs/browserpass
|
||||
./modules/programs/git
|
||||
./modules/programs/gpg
|
||||
./modules/programs/mbsync
|
||||
./modules/programs/neomutt
|
||||
./modules/programs/newsboat
|
||||
./modules/programs/readline
|
||||
./modules/programs/ssh
|
||||
./modules/programs/texlive
|
||||
./modules/programs/tmux
|
||||
./modules/programs/zsh
|
||||
./modules/xresources
|
||||
] ++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [
|
||||
./modules/misc/pam
|
||||
./modules/misc/xdg
|
||||
./modules/misc/xsession
|
||||
./modules/programs/firefox
|
||||
./modules/programs/getmail
|
||||
./modules/programs/rofi
|
||||
./modules/services/sxhkd
|
||||
./modules/services/window-managers/i3
|
||||
./modules/systemd
|
||||
]);
|
||||
}
|
||||
|
|
3
tests/modules/programs/browserpass/default.nix
Normal file
3
tests/modules/programs/browserpass/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
browserpass = ./browserpass.nix;
|
||||
}
|
3
tests/modules/programs/getmail/default.nix
Normal file
3
tests/modules/programs/getmail/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
getmail = ./getmail.nix;
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
imports = [ ../accounts/email-test-accounts.nix ];
|
||||
imports = [ ../../accounts/email-test-accounts.nix ];
|
||||
|
||||
config = {
|
||||
home.username = "hm-user";
|
3
tests/modules/programs/mbsync/default.nix
Normal file
3
tests/modules/programs/mbsync/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
mbsync = ./mbsync.nix;
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
imports = [ ../accounts/email-test-accounts.nix ];
|
||||
imports = [ ../../accounts/email-test-accounts.nix ];
|
||||
|
||||
config = {
|
||||
home.username = "hm-user";
|
3
tests/modules/programs/texlive/default.nix
Normal file
3
tests/modules/programs/texlive/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
texlive-minimal = ./texlive-minimal.nix;
|
||||
}
|
3
tests/modules/services/window-managers/i3/default.nix
Normal file
3
tests/modules/services/window-managers/i3/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
i3-keybindings = ./i3-keybindings.nix;
|
||||
}
|
3
tests/modules/xresources/default.nix
Normal file
3
tests/modules/xresources/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
xresources = ./xresources.nix;
|
||||
}
|
Loading…
Reference in a new issue