aboutsummaryrefslogtreecommitdiffstats
path: root/tests/by-name/ru/rust-motd/test.nix
blob: 960c6a7d25a2c16a6f647ad7ca7ee5d16b1e91b3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{vhack, ...}:
vhack.runTest {
  name = "rust-motd";

  nodes = {
    server = {config, ...}: {
      vhack = {
        rust-motd.enable = true;
      };
    };
  };

  services = [
    {
      server = "rust-motd.service";
      start = true;
    }
  ];

  testScript = {nodes, ...}:
  # Python
  ''
    with subtest("Motd generated"):
      server.succeed("cat /var/lib/rust-motd/motd | tee /dev/stderr | grep --invert-match --ignore-case Error")

    server.copy_from_vm("/var/lib/rust-motd/motd")
  '';
}