mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
parent
1c2f1b30b5
commit
1004fff704
2 changed files with 29 additions and 31 deletions
|
@ -678,7 +678,7 @@ in {
|
|||
maestral = handleTest ./maestral.nix {};
|
||||
magic-wormhole-mailbox-server = handleTest ./magic-wormhole-mailbox-server.nix {};
|
||||
magnetico = handleTest ./magnetico.nix {};
|
||||
mailcatcher = handleTest ./mailcatcher.nix {};
|
||||
mailcatcher = runTest ./mailcatcher.nix;
|
||||
mailhog = handleTest ./mailhog.nix {};
|
||||
mailpit = handleTest ./mailpit.nix {};
|
||||
mailman = handleTest ./mailman.nix {};
|
||||
|
|
|
@ -1,37 +1,35 @@
|
|||
import ./make-test-python.nix (
|
||||
{ lib, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
name = "mailcatcher";
|
||||
meta.maintainers = [ lib.maintainers.aanderse ];
|
||||
{
|
||||
name = "mailcatcher";
|
||||
meta.maintainers = [ lib.maintainers.aanderse ];
|
||||
|
||||
nodes.machine =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.mailcatcher.enable = true;
|
||||
nodes.machine =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.mailcatcher.enable = true;
|
||||
|
||||
programs.msmtp = {
|
||||
enable = true;
|
||||
accounts.default = {
|
||||
host = "localhost";
|
||||
port = 1025;
|
||||
};
|
||||
programs.msmtp = {
|
||||
enable = true;
|
||||
accounts.default = {
|
||||
host = "localhost";
|
||||
port = 1025;
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.mailutils ];
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
environment.systemPackages = [ pkgs.mailutils ];
|
||||
};
|
||||
|
||||
machine.wait_for_unit("mailcatcher.service")
|
||||
machine.wait_for_open_port(1025)
|
||||
machine.succeed(
|
||||
'echo "this is the body of the email" | mail -s "subject" root@example.org'
|
||||
)
|
||||
assert "this is the body of the email" in machine.succeed(
|
||||
"curl -f http://localhost:1080/messages/1.source"
|
||||
)
|
||||
'';
|
||||
}
|
||||
)
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
machine.wait_for_unit("mailcatcher.service")
|
||||
machine.wait_for_open_port(1025)
|
||||
machine.succeed(
|
||||
'echo "this is the body of the email" | mail -s "subject" root@example.org'
|
||||
)
|
||||
assert "this is the body of the email" in machine.succeed(
|
||||
"curl -f http://localhost:1080/messages/1.source"
|
||||
)
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue