tests: rework derivation stubbing
Instead of having to manually stub packages that should not be downloaded we instead automatically stub all packages (except a small list of whitelisted ones). Tests can re-introduce the real package by using the `realPkgs` module argument.
This commit is contained in:
parent
c5c2cbc866
commit
7a3f0b3b8d
480 changed files with 3557 additions and 5511 deletions
|
|
@ -1,61 +1,54 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.hexchat = {
|
||||
enable = true;
|
||||
overwriteConfigFiles = true;
|
||||
channels = {
|
||||
oftc = {
|
||||
charset = "UTF-8 (Unicode)";
|
||||
userName = "user";
|
||||
password = "password";
|
||||
loginMethod = "sasl";
|
||||
nickname = "user";
|
||||
nickname2 = "user_";
|
||||
realName = "real_user";
|
||||
options = {
|
||||
autoconnect = true;
|
||||
forceSSL = true;
|
||||
};
|
||||
servers = [ "irc.oftc.net" ];
|
||||
autojoin = [ "#home-manager" ];
|
||||
};
|
||||
efnet = {
|
||||
options = { forceSSL = true; };
|
||||
servers = [
|
||||
"irc.choopa.net"
|
||||
"irc.colosolutions.net"
|
||||
"irc.mzima.net"
|
||||
"irc.prison.net"
|
||||
];
|
||||
autojoin = [ "#computers" ];
|
||||
programs.hexchat = {
|
||||
enable = true;
|
||||
overwriteConfigFiles = true;
|
||||
channels = {
|
||||
oftc = {
|
||||
charset = "UTF-8 (Unicode)";
|
||||
userName = "user";
|
||||
password = "password";
|
||||
loginMethod = "sasl";
|
||||
nickname = "user";
|
||||
nickname2 = "user_";
|
||||
realName = "real_user";
|
||||
options = {
|
||||
autoconnect = true;
|
||||
forceSSL = true;
|
||||
};
|
||||
servers = [ "irc.oftc.net" ];
|
||||
autojoin = [ "#home-manager" ];
|
||||
};
|
||||
settings = {
|
||||
dcc_dir = "/home/user/Downloads";
|
||||
irc_nick1 = "user";
|
||||
irc_nick2 = "user_";
|
||||
irc_nick3 = "user__";
|
||||
irc_user_name = "user";
|
||||
irc_real_name = "real user";
|
||||
text_font = "Monospace 14";
|
||||
text_font_main = "Monospace 14";
|
||||
gui_slist_skip = "1"; # Skip network list on start-up
|
||||
gui_quit_dialog = "0";
|
||||
efnet = {
|
||||
options = { forceSSL = true; };
|
||||
servers = [
|
||||
"irc.choopa.net"
|
||||
"irc.colosolutions.net"
|
||||
"irc.mzima.net"
|
||||
"irc.prison.net"
|
||||
];
|
||||
autojoin = [ "#computers" ];
|
||||
};
|
||||
};
|
||||
|
||||
test.stubs.hexchat = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/.config/hexchat/hexchat.conf \
|
||||
${./basic-configuration-expected-main-config}
|
||||
assertFileContent \
|
||||
home-files/.config/hexchat/servlist.conf \
|
||||
${./basic-configuration-expected-serverlist-config}
|
||||
'';
|
||||
settings = {
|
||||
dcc_dir = "/home/user/Downloads";
|
||||
irc_nick1 = "user";
|
||||
irc_nick2 = "user_";
|
||||
irc_nick3 = "user__";
|
||||
irc_user_name = "user";
|
||||
irc_real_name = "real user";
|
||||
text_font = "Monospace 14";
|
||||
text_font_main = "Monospace 14";
|
||||
gui_slist_skip = "1"; # Skip network list on start-up
|
||||
gui_quit_dialog = "0";
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/.config/hexchat/hexchat.conf \
|
||||
${./basic-configuration-expected-main-config}
|
||||
assertFileContent \
|
||||
home-files/.config/hexchat/servlist.conf \
|
||||
${./basic-configuration-expected-serverlist-config}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue