Loading nixos/tests/all-tests.nix +1 −1 Original line number Diff line number Diff line Loading @@ -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 { }; Loading nixos/tests/mailhog.nix +25 −27 Original line number Diff line number Diff line import ./make-test-python.nix ( { lib, ... }: { name = "mailhog"; Loading @@ -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"]) ''; } ) Loading
nixos/tests/all-tests.nix +1 −1 Original line number Diff line number Diff line Loading @@ -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 { }; Loading
nixos/tests/mailhog.nix +25 −27 Original line number Diff line number Diff line import ./make-test-python.nix ( { lib, ... }: { name = "mailhog"; Loading @@ -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"]) ''; } )