nixos/onlyoffice: add simple test
This commit is contained in:
@@ -1139,6 +1139,7 @@ in
|
|||||||
ombi = runTest ./ombi.nix;
|
ombi = runTest ./ombi.nix;
|
||||||
omnom = runTest ./omnom;
|
omnom = runTest ./omnom;
|
||||||
oncall = runTest ./web-apps/oncall.nix;
|
oncall = runTest ./web-apps/oncall.nix;
|
||||||
|
onlyoffice = runTest ./onlyoffice.nix;
|
||||||
open-web-calendar = runTest ./web-apps/open-web-calendar.nix;
|
open-web-calendar = runTest ./web-apps/open-web-calendar.nix;
|
||||||
open-webui = runTest ./open-webui.nix;
|
open-webui = runTest ./open-webui.nix;
|
||||||
openarena = runTest ./openarena.nix;
|
openarena = runTest ./openarena.nix;
|
||||||
|
|||||||
30
nixos/tests/onlyoffice.nix
Normal file
30
nixos/tests/onlyoffice.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
let
|
||||||
|
port = 8000;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
name = "onlyoffice";
|
||||||
|
|
||||||
|
nodes.machine =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.onlyoffice = {
|
||||||
|
enable = true;
|
||||||
|
inherit port;
|
||||||
|
hostname = "office.example.com";
|
||||||
|
securityNonceFile = "${pkgs.writeText "nixos-test-onlyoffice-nonce.conf" ''
|
||||||
|
set $secure_link_secret "nixostest";
|
||||||
|
''}";
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.hosts = {
|
||||||
|
"::1" = [ "office.example.com" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = ''
|
||||||
|
machine.wait_for_unit("onlyoffice-docservice.service")
|
||||||
|
machine.wait_for_unit("onlyoffice-converter.service")
|
||||||
|
machine.wait_for_open_port(${builtins.toString port})
|
||||||
|
machine.succeed("curl --fail http://office.example.com/healthcheck")
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
liberation_ttf_v1,
|
liberation_ttf_v1,
|
||||||
writeScript,
|
writeScript,
|
||||||
xorg,
|
xorg,
|
||||||
|
nixosTests,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@@ -72,6 +73,7 @@ let
|
|||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
tests = nixosTests.onlyoffice;
|
||||||
fhs = buildFHSEnv {
|
fhs = buildFHSEnv {
|
||||||
name = "onlyoffice-wrapper";
|
name = "onlyoffice-wrapper";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user