nixos/tests/pleroma: fix timeout

- fix 'toot login_cli' password enter
- add '--debug' to toot for additional logs
- add wait for '/var/lib/pleroma' to exist
- remove unused 'with pkgs;'
- set 10 minute timeout
This commit is contained in:
ghpzin 2024-08-14 21:14:48 +03:00
parent 25e9685b9a
commit bddd01e49f
No known key found for this signature in database

View File

@ -32,7 +32,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
# system one. Overriding this pretty bad default behaviour. # system one. Overriding this pretty bad default behaviour.
export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
echo "jamy-password" | toot login_cli -i "pleroma.nixos.test" -e "jamy@nixos.test" toot --debug login_cli -i "pleroma.nixos.test" -e "jamy@nixos.test" -p "jamy-password"
echo "Login OK" echo "Login OK"
# Send a toot then verify it's part of the public timeline # Send a toot then verify it's part of the public timeline
@ -182,7 +182,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
client = { nodes, pkgs, config, ... }: { client = { nodes, pkgs, config, ... }: {
security.pki.certificateFiles = [ "${tls-cert}/cert.pem" ]; security.pki.certificateFiles = [ "${tls-cert}/cert.pem" ];
networking.extraHosts = hosts nodes; networking.extraHosts = hosts nodes;
environment.systemPackages = with pkgs; [ environment.systemPackages = [
pkgs.toot pkgs.toot
send-toot send-toot
]; ];
@ -191,7 +191,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
security.pki.certificateFiles = [ "${tls-cert}/cert.pem" ]; security.pki.certificateFiles = [ "${tls-cert}/cert.pem" ];
networking.extraHosts = hosts nodes; networking.extraHosts = hosts nodes;
networking.firewall.enable = false; networking.firewall.enable = false;
environment.systemPackages = with pkgs; [ environment.systemPackages = [
provision-db provision-db
provision-secrets provision-secrets
provision-user provision-user
@ -245,10 +245,13 @@ import ./make-test-python.nix ({ pkgs, ... }:
testScript = { nodes, ... }: '' testScript = { nodes, ... }: ''
pleroma.wait_for_unit("postgresql.service") pleroma.wait_for_unit("postgresql.service")
pleroma.succeed("provision-db") pleroma.succeed("provision-db")
pleroma.wait_for_file("/var/lib/pleroma")
pleroma.succeed("provision-secrets") pleroma.succeed("provision-secrets")
pleroma.systemctl("restart pleroma.service") pleroma.systemctl("restart pleroma.service")
pleroma.wait_for_unit("pleroma.service") pleroma.wait_for_unit("pleroma.service")
pleroma.succeed("provision-user") pleroma.succeed("provision-user")
client.succeed("send-toot") client.succeed("send-toot")
''; '';
meta.timeout = 600;
}) })