about summary refs log tree commit diff
path: root/nixos/tests/pleroma.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests/pleroma.nix')
-rw-r--r--nixos/tests/pleroma.nix11
1 files changed, 6 insertions, 5 deletions
diff --git a/nixos/tests/pleroma.nix b/nixos/tests/pleroma.nix
index 721f27e8f8c6..9e1bc1ccefbf 100644
--- a/nixos/tests/pleroma.nix
+++ b/nixos/tests/pleroma.nix
@@ -32,18 +32,18 @@ import ./make-test-python.nix ({ pkgs, ... }:
     # system one. Overriding this pretty bad default behaviour.
     export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
 
-    toot --debug login_cli -i "pleroma.nixos.test" -e "jamy@nixos.test" -p "jamy-password"
+    toot login_cli -i "pleroma.nixos.test" -e "jamy@nixos.test" -p 'jamy-password'
     echo "Login OK"
 
     # Send a toot then verify it's part of the public timeline
-    echo "y" | toot post "hello world Jamy here"
+    toot post "hello world Jamy here"
     echo "Send toot OK"
-    echo "y" | toot timeline | grep -c "hello world Jamy here"
+    toot timeline -1 | grep -F -q "hello world Jamy here"
     echo "Get toot from timeline OK"
 
     # Test file upload
-    echo "y" | toot upload ${db-seed} | grep -c "https://pleroma.nixos.test/media"
-    echo "File upload OK"
+    echo "y" | ${pkgs.toot}/bin/toot upload <(dd if=/dev/zero bs=1024 count=1024 status=none) \
+      | grep -F -q "https://pleroma.nixos.test/media"
 
     echo "====================================================="
     echo "=                   SUCCESS                         ="
@@ -244,6 +244,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
 
   testScript = { nodes, ... }: ''
     pleroma.wait_for_unit("postgresql.service")
+    pleroma.wait_until_succeeds("ls /var/lib/pleroma")
     pleroma.succeed("provision-db")
     pleroma.wait_for_file("/var/lib/pleroma")
     pleroma.succeed("provision-secrets")