diff options
author | Federico Beffa <beffa@fbengineering.ch> | 2022-08-16 20:33:08 +0200 |
---|---|---|
committer | pennae <82953136+pennae@users.noreply.github.com> | 2022-09-03 16:48:43 +0200 |
commit | 8be4e9e2ece290f3f2046fc554ed00e5a42df766 (patch) | |
tree | d0e45f08d7849a38e900ae5cf165ce304de2a305 /nixos/tests/languagetool.nix | |
parent | 510ba0c791e4c506b9ec9e9d779f81c66cbc499b (diff) |
nixos/service/languagetool: init
Diffstat (limited to 'nixos/tests/languagetool.nix')
-rw-r--r-- | nixos/tests/languagetool.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/nixos/tests/languagetool.nix b/nixos/tests/languagetool.nix new file mode 100644 index 0000000000000..e4ab2a47064e6 --- /dev/null +++ b/nixos/tests/languagetool.nix @@ -0,0 +1,19 @@ +import ./make-test-python.nix ({ pkgs, lib, ... }: +let port = 8082; +in { + name = "languagetool"; + meta = with lib.maintainers; { maintainers = [ fbeffa ]; }; + + nodes.machine = { ... }: + { + services.languagetool.enable = true; + services.languagetool.port = port; + }; + + testScript = '' + machine.start() + machine.wait_for_unit("languagetool.service") + machine.wait_for_open_port(${toString port}) + machine.wait_until_succeeds('curl -d "language=en-US" -d "text=a simple test" http://localhost:${toString port}/v2/check') + ''; +}) |