aboutsummaryrefslogtreecommitdiffstats
path: root/tests/by-name/em
diff options
context:
space:
mode:
Diffstat (limited to 'tests/by-name/em')
-rw-r--r--tests/by-name/em/email-dns/nodes/name_server.nix2
-rw-r--r--tests/by-name/em/email-dns/test.nix23
-rw-r--r--tests/by-name/em/email-http/test.nix24
-rw-r--r--tests/by-name/em/email-ip/test.nix3
4 files changed, 16 insertions, 36 deletions
diff --git a/tests/by-name/em/email-dns/nodes/name_server.nix b/tests/by-name/em/email-dns/nodes/name_server.nix
index d9d3617..bde1a16 100644
--- a/tests/by-name/em/email-dns/nodes/name_server.nix
+++ b/tests/by-name/em/email-dns/nodes/name_server.nix
@@ -63,7 +63,7 @@
adkim = "strict";
aspf = "strict";
fo = ["0" "1" "d" "s"];
- p = "quarantine";
+ p = "reject";
rua = cfg.admin;
ruf = [cfg.admin];
}
diff --git a/tests/by-name/em/email-dns/test.nix b/tests/by-name/em/email-dns/test.nix
index f0399a5..33955d8 100644
--- a/tests/by-name/em/email-dns/test.nix
+++ b/tests/by-name/em/email-dns/test.nix
@@ -14,6 +14,9 @@
inherit (user) mkUser;
in
nixos-lib.runTest {
+ # Wait until we actually use stalwart again
+ meta.broken = true;
+
hostPkgs = pkgs; # the Nixpkgs package set used outside the VMs
name = "email-dns";
@@ -90,23 +93,13 @@ in
}
'';
- acme_scripts = import ../../../common/acme/scripts.nix {inherit pkgs;};
+ acme = import ../../../common/acme {inherit pkgs;};
in
- /*
- python
- */
+ acme.prepare ["mail1_server" "mail2_server" "alice" "bob"]
+ # Python
''
from time import sleep
- # Start dependencies for the other services
- acme.start()
- acme.wait_for_unit("pebble.service")
- name_server.start()
- name_server.wait_for_unit("nsd.service")
-
- # Start the actual testing machines
- start_all()
-
mail1_server.wait_for_unit("stalwart-mail.service")
mail1_server.wait_for_open_port(993) # imap
mail1_server.wait_for_open_port(465) # smtp
@@ -120,10 +113,6 @@ in
name_server.wait_until_succeeds("stat /var/lib/acme/mta-sts.alice.com/cert.pem")
name_server.wait_until_succeeds("stat /var/lib/acme/mta-sts.bob.com/cert.pem")
- with subtest("Add pebble ca key to all services"):
- for node in [name_server, mail1_server, mail2_server, alice, bob]:
- node.succeed("${acme_scripts.add_pebble_acme_ca}")
-
with subtest("Both mailserver successfully started all services"):
import json
def all_services_running(host):
diff --git a/tests/by-name/em/email-http/test.nix b/tests/by-name/em/email-http/test.nix
index f508b9f..42fd22b 100644
--- a/tests/by-name/em/email-http/test.nix
+++ b/tests/by-name/em/email-http/test.nix
@@ -14,6 +14,9 @@
inherit (user) mkUser;
in
nixos-lib.runTest {
+ # Wait until we actually use stalwart again
+ meta.broken = true;
+
hostPkgs = pkgs; # the Nixpkgs package set used outside the VMs
name = "email-http";
@@ -71,32 +74,17 @@ in
# TODO(@bpeetz): This test should also test the http JMAP features of stalwart-mail. <2025-04-12>
testScript = _: let
- acme_scripts = import ../../../common/acme/scripts.nix {inherit pkgs;};
+ acme = import ../../../common/acme {inherit pkgs;};
in
- /*
- python
- */
+ acme.prepare ["mail_server" "bob"]
+ # Python
''
- # Start dependencies for the other services
- acme.start()
- acme.wait_for_unit("pebble.service")
- name_server.start()
- name_server.wait_for_unit("nsd.service")
-
- # Start the actual testing machines
- start_all()
-
mail_server.wait_for_unit("stalwart-mail.service")
mail_server.wait_for_open_port(993) # imap
mail_server.wait_for_open_port(465) # smtp
bob.wait_for_unit("multi-user.target")
- with subtest("Add pebble ca key to all services"):
- for node in [name_server, mail_server, bob]:
- node.wait_for_unit("network-online.target")
- node.succeed("${acme_scripts.add_pebble_acme_ca}")
-
with subtest("The mailserver successfully started all services"):
import json
def all_services_running(host):
diff --git a/tests/by-name/em/email-ip/test.nix b/tests/by-name/em/email-ip/test.nix
index dabc404..c0b2d7e 100644
--- a/tests/by-name/em/email-ip/test.nix
+++ b/tests/by-name/em/email-ip/test.nix
@@ -78,6 +78,9 @@
};
in
nixos-lib.runTest {
+ # Wait until we actually use stalwart again
+ meta.broken = true;
+
hostPkgs = pkgs; # the Nixpkgs package set used outside the VMs
name = "email";