Commit fe639ca4 authored by Mikael Voss's avatar Mikael Voss Committed by Yaya
Browse files

nixos/tests/akkoma: Adapt to latest toot release

parent 87b923bd
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -31,16 +31,12 @@ let

    export REQUESTS_CA_BUNDLE="/etc/ssl/certs/ca-certificates.crt"

    echo '${userPassword}' | ${pkgs.toot}/bin/toot login_cli -i "akkoma.nixos.test" -e "jamy@nixos.test"
    echo "y" | ${pkgs.toot}/bin/toot post "hello world Jamy here"

    # Retrieving timeline with toot currently broken due to incompatible timestamp format
    # cf. <https://akkoma.dev/AkkomaGang/akkoma/issues/637> and <https://github.com/ihabunek/toot/issues/399>
    #echo "y" | ${pkgs.toot}/bin/toot timeline | grep -F -q "hello world Jamy here"
    ${pkgs.toot}/bin/toot login_cli -i "akkoma.nixos.test" -e "jamy@nixos.test" -p '${userPassword}'
    ${pkgs.toot}/bin/toot post "hello world Jamy here"
    ${pkgs.toot}/bin/toot timeline -1 | grep -F -q "hello world Jamy here"

    # Test file upload
    echo "y" | ${pkgs.toot}/bin/toot upload <(dd if=/dev/zero bs=1024 count=1024 status=none) \
      | grep -F -q "https://akkoma.nixos.test/media"
    ${pkgs.toot}/bin/toot upload <(dd if=/dev/zero bs=1024 count=1024 status=none)
  '';

  checkFe = pkgs.writers.writeBashBin "checkFe" ''