diff options
author | misuzu <bakalolka@gmail.com> | 2023-05-19 21:18:17 +0300 |
---|---|---|
committer | misuzu <bakalolka@gmail.com> | 2023-06-05 09:07:34 +0300 |
commit | 45ffb33514488fd27b9355081a687db8312d97f4 (patch) | |
tree | 5eee1440472a320903ef3f4b4524e84872ca7399 /nixos/tests/web-apps | |
parent | f0fb24611876f48151defbe1df51401ae926a150 (diff) |
nixos/gotosocial: init
Co-authored-by: Peder Bergebakken Sundt <pbsds@hotmail.com>
Diffstat (limited to 'nixos/tests/web-apps')
-rw-r--r-- | nixos/tests/web-apps/gotosocial.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/nixos/tests/web-apps/gotosocial.nix b/nixos/tests/web-apps/gotosocial.nix new file mode 100644 index 0000000000000..6d279ab63a799 --- /dev/null +++ b/nixos/tests/web-apps/gotosocial.nix @@ -0,0 +1,28 @@ +{ lib, ... }: +{ + name = "gotosocial"; + meta.maintainers = with lib.maintainers; [ misuzu ]; + + nodes.machine = { pkgs, ... }: { + environment.systemPackages = [ pkgs.jq ]; + services.gotosocial = { + enable = true; + setupPostgresqlDB = true; + settings = { + host = "localhost:8081"; + port = 8081; + }; + }; + }; + + testScript = '' + machine.wait_for_unit("gotosocial.service") + machine.wait_for_unit("postgresql.service") + machine.wait_for_open_port(8081) + + # check user registration via cli + machine.succeed("curl -sS -f http://localhost:8081/nodeinfo/2.0 | jq '.usage.users.total' | grep -q '^0$'") + machine.succeed("gotosocial-admin account create --username nickname --email email@example.com --password kurtz575VPeBgjVm") + machine.succeed("curl -sS -f http://localhost:8081/nodeinfo/2.0 | jq '.usage.users.total' | grep -q '^1$'") + ''; +} |