docker-mailserver/test/tests/serial
Brennan Kinney a7e6439a39
fix: Workaround postconf write settling logic (#2998)
* fix: Workaround `postconf` write settle logic

After updating `main.cf`, to avoid an enforced delay from reading the config by postfix tools, we can ensure the modified time is at least 2 seconds in the past as a workaround. This should be ok with our usage AFAIK.

Shaves off 2+ seconds roughly off each container startup, reduces roughly 2+ minutes off tests.

* chore: Only modify `mtime` if less than 2 seconds ago

- Slight improvement by avoiding unnecessary writes with a conditional check on the util method.
- Can more comfortably call this during `postfix reload` in the change detection cycle now.
- Identified other tests that'd benefit from this, created a helper method to call instead of copy/paste.
- The `setup email restrict` command also did a modification and reload. Added util method here too.

* tests(fix): `mail_smtponly.bats` should wait for Postfix

- `postfix reload` fails if the service is not ready yet.
- `service postfix reload` and `/etc/init.d/postfix reload` presumably wait until it is ready? (as these work regardless)

* chore: Review feedback - Move reload method into utilities
2023-01-13 10:10:58 +13:00
..
mail_changedetector.bats fix(changedetector): Use service reload commands instead of supervisorctl restart <service> (#2947) 2022-12-24 01:57:24 +13:00
mail_fetchmail.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00
mail_fetchmail_parallel.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00
mail_hostname.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00
mail_lmtp_ip.bats Fix several typos (#2993) 2023-01-11 13:31:21 +13:00
mail_pop3.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00
mail_postfix_inet.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00
mail_privacy.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00
mail_quotas_disabled.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00
mail_smtponly.bats fix: Workaround postconf write settling logic (#2998) 2023-01-13 10:10:58 +13:00
mail_special_use_folders.bats chore: Remove legacy ENV SASL_PASSWD (#2946) 2022-12-23 15:30:40 +13:00
mail_time.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00
mail_tls_dhparams.bats tests(refactor): Adjust mail_tls_dhparams.bats (#2994) 2023-01-12 10:04:50 +13:00
mail_with_imap.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00
mail_with_ldap.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00
mail_with_mdbox.bats chore: Remove legacy ENV SASL_PASSWD (#2946) 2022-12-23 15:30:40 +13:00
mail_with_postgrey_disabled_by_default.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00
mail_with_relays.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00
mail_with_sdbox.bats chore: Remove legacy ENV SASL_PASSWD (#2946) 2022-12-23 15:30:40 +13:00
no_container.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00
open_dkim.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00
permit_docker.bats fix: Workaround postconf write settling logic (#2998) 2023-01-13 10:10:58 +13:00
sedfile.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00
setup-cli.bats fix(changedetector): Use service reload commands instead of supervisorctl restart <service> (#2947) 2022-12-24 01:57:24 +13:00
test_helper.bats Fix several typos (#2993) 2023-01-11 13:31:21 +13:00
tests.bats tests: Extract some test cases out from tests.bats (#2980) 2023-01-07 11:36:20 +13:00