services: update hello-world readme and tests
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
testFlake = clanLib.clan {
|
||||
testClan = clanLib.clan {
|
||||
self = { };
|
||||
# Point to the folder of the module
|
||||
# TODO: make this optional
|
||||
@@ -33,10 +33,20 @@ let
|
||||
};
|
||||
in
|
||||
{
|
||||
test_simple = {
|
||||
config = testFlake.config;
|
||||
/**
|
||||
We highly advocate the usage of:
|
||||
https://github.com/nix-community/nix-unit
|
||||
|
||||
expr = { };
|
||||
expected = { };
|
||||
If you use flake-parts you can use the native integration: https://flake.parts/options/nix-unit.html
|
||||
*/
|
||||
test_simple = {
|
||||
# Allows inspection via the nix-repl
|
||||
# Ignored by nix-unit; it only looks at 'expr' and 'expected'
|
||||
inherit testClan;
|
||||
|
||||
# Assert that jon has the
|
||||
# configured greeting in 'environment.etc.hello.text'
|
||||
expr = testClan.config.nixosConfigurations.jon.config.environment.etc."hello".text;
|
||||
expected = "Good evening World!";
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user