mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 15:14:26 +00:00
tests: fix test.assert.assertions.enable not working
Co-authored-by: Robert Helgesson <robert@rycee.net>
This commit is contained in:
parent
4fa1ba72a3
commit
b78b584368
1 changed files with 34 additions and 26 deletions
|
@ -37,37 +37,45 @@ with lib;
|
|||
};
|
||||
};
|
||||
|
||||
config = mkIf config.test.asserts.warnings.enable {
|
||||
home.file = {
|
||||
"asserts/warnings.actual".text = concatStringsSep ''
|
||||
config = mkMerge [
|
||||
(mkIf config.test.asserts.warnings.enable {
|
||||
home.file = {
|
||||
"asserts/warnings.actual".text = concatStringsSep ''
|
||||
|
||||
--
|
||||
'' config.warnings;
|
||||
--
|
||||
'' config.warnings;
|
||||
};
|
||||
|
||||
"asserts/assertions.actual".text = concatStringsSep ''
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/asserts/warnings.actual \
|
||||
${
|
||||
pkgs.writeText "warnings.expected" (concatStringsSep ''
|
||||
|
||||
--
|
||||
'' (map (x: x.message) (filter (x: !x.assertion) config.assertions));
|
||||
};
|
||||
--
|
||||
'' config.test.asserts.warnings.expected)
|
||||
}
|
||||
'';
|
||||
})
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/asserts/warnings.actual \
|
||||
${
|
||||
pkgs.writeText "warnings.expected" (concatStringsSep ''
|
||||
(mkIf config.test.asserts.assertions.enable {
|
||||
home.file = {
|
||||
"asserts/assertions.actual".text = concatStringsSep ''
|
||||
|
||||
--
|
||||
'' config.test.asserts.warnings.expected)
|
||||
}
|
||||
--
|
||||
'' (map (x: x.message) (filter (x: !x.assertion) config.assertions));
|
||||
};
|
||||
|
||||
assertFileContent \
|
||||
home-files/asserts/assertions.actual \
|
||||
${
|
||||
pkgs.writeText "assertions.expected" (concatStringsSep ''
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/asserts/assertions.actual \
|
||||
${
|
||||
pkgs.writeText "assertions.expected" (concatStringsSep ''
|
||||
|
||||
--
|
||||
'' config.test.asserts.assertions.expected)
|
||||
}
|
||||
'';
|
||||
};
|
||||
--
|
||||
'' config.test.asserts.assertions.expected)
|
||||
}
|
||||
'';
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue