tests: init testSuites
to test suites and profile processing
This commit is contained in:
parent
92700888b7
commit
259ec11d92
|
@ -66,4 +66,24 @@ lib.runTests {
|
|||
(rgxToString "a?" "a" == "a")
|
||||
(rgxToString "hat" "foohatbar" == "hat")
|
||||
];
|
||||
|
||||
testSuites =
|
||||
let
|
||||
profiles = os.mkProfileAttrs (toString ./profiles);
|
||||
users = "";
|
||||
userProfiles = "";
|
||||
suites = { profiles, ... }: {
|
||||
system.bar = [ profiles.foo ];
|
||||
};
|
||||
in
|
||||
{
|
||||
expr = os.mkSuites { inherit profiles users userProfiles suites; };
|
||||
expected = {
|
||||
system = {
|
||||
bar = [ profiles.foo.default ];
|
||||
allProfiles = [ profiles.foo.default profiles.t.default ];
|
||||
allUsers = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
3
tests/profiles/foo/default.nix
Normal file
3
tests/profiles/foo/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
bar = 5;
|
||||
}
|
0
tests/profiles/t/default.nix
Normal file
0
tests/profiles/t/default.nix
Normal file
Loading…
Reference in a new issue