aboutsummaryrefslogtreecommitdiffstats
path: root/tests/by-name/ru/rust-motd/test.nix
blob: b50abf59872f3e3554f5a8957611ed819643fddd (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
29
30
{vhack, ...}:
vhack.runTest {
  name = "rust-motd";

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

  services = [
    {
      server = {
        name = "rust-motd.service";
        should_be_started = 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_machine("/var/lib/rust-motd/motd")
  '';
}