nixos/thelounge: add test
This commit is contained in:
parent
e00186bc0f
commit
cf12e0e7ed
|
@ -472,6 +472,7 @@ in
|
||||||
taskserver = handleTest ./taskserver.nix {};
|
taskserver = handleTest ./taskserver.nix {};
|
||||||
telegraf = handleTest ./telegraf.nix {};
|
telegraf = handleTest ./telegraf.nix {};
|
||||||
teleport = handleTest ./teleport.nix {};
|
teleport = handleTest ./teleport.nix {};
|
||||||
|
thelounge = handleTest ./thelounge.nix {};
|
||||||
tiddlywiki = handleTest ./tiddlywiki.nix {};
|
tiddlywiki = handleTest ./tiddlywiki.nix {};
|
||||||
tigervnc = handleTest ./tigervnc.nix {};
|
tigervnc = handleTest ./tigervnc.nix {};
|
||||||
timezone = handleTest ./timezone.nix {};
|
timezone = handleTest ./timezone.nix {};
|
||||||
|
|
29
nixos/tests/thelounge.nix
Normal file
29
nixos/tests/thelounge.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
import ./make-test-python.nix {
|
||||||
|
nodes = {
|
||||||
|
private = { config, pkgs, ... }: {
|
||||||
|
services.thelounge = {
|
||||||
|
enable = true;
|
||||||
|
plugins = [ pkgs.theLoungePlugins.themes.solarized ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
public = { config, pkgs, ... }: {
|
||||||
|
services.thelounge = {
|
||||||
|
enable = true;
|
||||||
|
public = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = ''
|
||||||
|
start_all()
|
||||||
|
|
||||||
|
for machine in machines:
|
||||||
|
machine.wait_for_unit("thelounge.service")
|
||||||
|
machine.wait_for_open_port(9000)
|
||||||
|
|
||||||
|
private.wait_until_succeeds("journalctl -u thelounge.service | grep thelounge-theme-solarized")
|
||||||
|
private.wait_until_succeeds("journalctl -u thelounge.service | grep 'in private mode'")
|
||||||
|
public.wait_until_succeeds("journalctl -u thelounge.service | grep 'in public mode'")
|
||||||
|
'';
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, nodejs, stdenv, applyPatches, fetchFromGitHub, fetchpatch, fetchurl }:
|
{ pkgs, nodejs, stdenv, applyPatches, fetchFromGitHub, fetchpatch, fetchurl, nixosTests }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
@ -442,6 +442,7 @@ let
|
||||||
echo /var/lib/thelounge > $out/lib/node_modules/thelounge/.thelounge_home
|
echo /var/lib/thelounge > $out/lib/node_modules/thelounge/.thelounge_home
|
||||||
patch -d $out/lib/node_modules/thelounge -p1 < ${./thelounge-packages-path.patch}
|
patch -d $out/lib/node_modules/thelounge -p1 < ${./thelounge-packages-path.patch}
|
||||||
'';
|
'';
|
||||||
|
passthru.tests = { inherit (nixosTests) thelounge; };
|
||||||
};
|
};
|
||||||
|
|
||||||
yaml-language-server = super.yaml-language-server.override {
|
yaml-language-server = super.yaml-language-server.override {
|
||||||
|
|
Loading…
Reference in a new issue