about summary refs log tree commit diff
path: root/nixos/tests/gonic.nix
blob: adf0f511a9cf7e9ebade992788ef14a856fd061b (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
import ./make-test-python.nix ({ pkgs, ... }: {
  name = "gonic";

  nodes.machine = { ... }: {
    systemd.tmpfiles.settings = {
      "10-gonic" = {
        "/tmp/music"."d" = {};
        "/tmp/podcast"."d" = {};
        "/tmp/playlists"."d" = {};
      };
    };
    services.gonic = {
      enable = true;
      settings = {
        music-path = [ "/tmp/music" ];
        podcast-path = "/tmp/podcast";
        playlists-path = "/tmp/playlists";
      };
    };
  };

  testScript = ''
    machine.wait_for_unit("gonic")
    machine.wait_for_open_port(4747)
  '';
})