Unverified Commit f3ae7778 authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

nixosTests.mailhog: remove unsupported flags from sendmail & migrate to runTest (#399113)

parents d97535d5 4aee21a5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -767,7 +767,7 @@ in
  magic-wormhole-mailbox-server = runTest ./magic-wormhole-mailbox-server.nix;
  magnetico = handleTest ./magnetico.nix { };
  mailcatcher = runTest ./mailcatcher.nix;
  mailhog = handleTest ./mailhog.nix { };
  mailhog = runTest ./mailhog.nix;
  mailpit = runTest ./mailpit.nix;
  mailman = runTest ./mailman.nix;
  man = handleTest ./man.nix { };
+25 −27
Original line number Diff line number Diff line
import ./make-test-python.nix (
{ lib, ... }:
{
  name = "mailhog";
@@ -20,11 +19,10 @@ import ./make-test-python.nix (
    machine.wait_for_open_port(1025)
    machine.wait_for_open_port(8025)
    # Test sendmail wrapper (this uses smtp, which tests the connection)
      machine.succeed('printf "To: root@example.com\r\n\r\nthis is the body of the email" | sendmail -t -i -f sender@example.com')
    machine.succeed('printf "To: root@example.com\r\n\r\nthis is the body of the email" | sendmail -f sender@example.com')
    res = machine.succeed(
        "curl --fail http://localhost:8025/api/v2/messages"
    )
    assert all(msg in res for msg in ["this is the body of the email", "sender@example.com", "root@example.com"])
  '';
}
)