nixos/tzupdate: Add basic test

Changed files
+23
nixos
+1
nixos/tests/all-tests.nix
···
tuxguitar = runTest ./tuxguitar.nix;
twingate = runTest ./twingate.nix;
typesense = handleTest ./typesense.nix { };
ucarp = handleTest ./ucarp.nix { };
udisks2 = handleTest ./udisks2.nix { };
ulogd = handleTest ./ulogd/ulogd.nix { };
···
tuxguitar = runTest ./tuxguitar.nix;
twingate = runTest ./twingate.nix;
typesense = handleTest ./typesense.nix { };
+
tzupdate = runTest ./tzupdate.nix;
ucarp = handleTest ./ucarp.nix { };
udisks2 = handleTest ./udisks2.nix { };
ulogd = handleTest ./ulogd/ulogd.nix { };
+22
nixos/tests/tzupdate.nix
···
···
+
{ lib, ... }:
+
let
+
clientNodeName = "client";
+
in
+
{
+
name = "tzupdate";
+
+
# TODO: Test properly:
+
# - Add server node
+
# - Add client configuration to talk to the server node
+
# - Assert that the time zone changes appropriately
+
nodes.${clientNodeName} = {
+
services.tzupdate.enable = true;
+
};
+
+
testScript = ''
+
start_all()
+
${clientNodeName}.wait_for_unit("multi-user.target")
+
'';
+
+
meta.maintainers = [ lib.maintainers.l0b0 ];
+
}