summaryrefslogtreecommitdiffstats
path: root/nixos/tests/rshim.nix
blob: 474018732e1651deb05e8a1fc79ddeba1358fcb8 (plain)
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
{
  system ? builtins.currentSystem,
  config ? { },
  pkgs ? import ../.. { inherit system config; },
}:

with import ../lib/testing-python.nix { inherit system pkgs; };
with pkgs.lib;

{
  basic = makeTest {
    name = "rshim";
    meta.maintainers = with maintainers; [ nikstur ];

    nodes.machine =
      { config, pkgs, ... }:
      {
        services.rshim.enable = true;
      };

    testScript =
      { nodes, ... }:
      ''
        machine.start()
        machine.wait_for_unit("multi-user.target")

        print(machine.succeed("systemctl status rshim.service"))
      '';
  };
}