File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 713713 languagetool = handleTest ./languagetool.nix { } ;
714714 lanraragi = handleTest ./lanraragi.nix { } ;
715715 latestKernel . login = handleTest ./login.nix { latestKernel = true ; } ;
716+ lavalink = runTest ./lavalink.nix ;
716717 leaps = handleTest ./leaps.nix { } ;
717718 lemmy = handleTest ./lemmy.nix { } ;
718719 libinput = handleTest ./libinput.nix { } ;
Original file line number Diff line number Diff line change 1+ { lib , ... } :
2+
3+ let
4+ password = "s3cRe!p4SsW0rD" ;
5+ in
6+
7+ {
8+ name = "lavalink" ;
9+ meta . maintainers = with lib . maintainers ; [ nanoyaki ] ;
10+
11+ nodes = {
12+ machine = {
13+ services . lavalink = {
14+ enable = true ;
15+ port = 1234 ;
16+ inherit password ;
17+ } ;
18+ } ;
19+ machine2 =
20+ { pkgs , ... } :
21+ {
22+ services . lavalink = {
23+ enable = true ;
24+ port = 1235 ;
25+ environmentFile = "${ pkgs . writeText "passwordEnvFile" ''
26+ LAVALINK_SERVER_PASSWORD=${ password }
27+ '' } ";
28+ } ;
29+ } ;
30+ } ;
31+
32+ testScript = ''
33+ start_all()
34+
35+ machine.wait_for_unit("lavalink.service")
36+ machine.wait_for_open_port(1234)
37+ machine.succeed("curl --header \"User-Id: 1204475253028429844\" --header \"Client-Name: shoukaku/4.1.1\" --header \"Authorization: ${ password } \" http://localhost:1234/v4/info --fail -v")
38+
39+ machine2.wait_for_unit("lavalink.service")
40+ machine2.wait_for_open_port(1235)
41+ machine2.succeed("curl --header \"User-Id: 1204475253028429844\" --header \"Client-Name: shoukaku/4.1.1\" --header \"Authorization: ${ password } \" http://localhost:1235/v4/info --fail -v")
42+ '' ;
43+ }
You can’t perform that action at this time.
0 commit comments