diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2023-11-16 18:32:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-16 18:32:44 +0100 |
commit | 3acc2484cf134182bfc556308c5d355ed6edd24a (patch) | |
tree | 0d58b4825c5cbd37581b05b21fa61db6bc80c5d5 /nixos/tests | |
parent | a1380bbcc3c1463c9b1545b6601faf6a2470b1d6 (diff) | |
parent | 8c7c1e7a302671c685cbcfc3730b6d33dfde34b9 (diff) |
Merge pull request #267560 from anthonyroussel/bugfix/plantuml-server-nixos
nixos/plantuml-server: fix
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/plantuml-server.nix | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index f44fcfcf54ab6..fdd95a9b4f94e 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -656,6 +656,7 @@ in { phylactery = handleTest ./web-apps/phylactery.nix {}; pict-rs = handleTest ./pict-rs.nix {}; pinnwand = handleTest ./pinnwand.nix {}; + plantuml-server = handleTest ./plantuml-server.nix {}; plasma-bigscreen = handleTest ./plasma-bigscreen.nix {}; plasma5 = handleTest ./plasma5.nix {}; plasma5-systemd-start = handleTest ./plasma5-systemd-start.nix {}; diff --git a/nixos/tests/plantuml-server.nix b/nixos/tests/plantuml-server.nix new file mode 100644 index 0000000000000..460c30919aecf --- /dev/null +++ b/nixos/tests/plantuml-server.nix @@ -0,0 +1,20 @@ +import ./make-test-python.nix ({ pkgs, lib, ... }: { + name = "plantuml-server"; + meta.maintainers = with lib.maintainers; [ anthonyroussel ]; + + nodes.machine = { pkgs, ... }: { + environment.systemPackages = [ pkgs.curl ]; + services.plantuml-server.enable = true; + }; + + testScript = '' + start_all() + + machine.wait_for_unit("plantuml-server.service") + machine.wait_for_open_port(8080) + + with subtest("Generate chart"): + chart_id = machine.succeed("curl -sSf http://localhost:8080/plantuml/coder -d 'Alice -> Bob'") + machine.succeed("curl -sSf http://localhost:8080/plantuml/txt/{}".format(chart_id)) + ''; +}) |