docker-mailserver/test/tests/serial
Brennan Kinney 0bbec09529 refactor: Parallel Tests
- `disabled_clamav_spamassassin`:
  - Just shuffling the test order around, and removing the restart test at the end which doesn't make sense.

- `postscreen`:
  - Now uses common helper for getting container IP
  - Does not appear to need the `NET_ADMIN` capability?
  - Reduced startup time for the 2nd container + additional context about it's relevance.
  - Test cases are largely the same, but refactored the `nc` alternative that properly waits it's turn. This only needs to run once. Added additional commentary and made into a generic method if needed in other tests.

- `fail2ban`:
  - Use the common container IP helper method.
  - Postscreen isn't affecting this test, it's not required to do the much slower exchange with the mail server when sending a login failure.
  - IP being passed into ENV is no longer necessary.
  - `sleep 5` in the related test cases doesn't seem necessary, can better rely on polling with timeout.
  - `sleep 10` for `setup.sh` also doesn't appear to be necessary.

- `postgrey`:
  - Reduced POSTGREY_DELAY to 3, which shaves a fair amount of wasted time while still verifying the delay works.
  - One of the checks in `main.cf` doesn't seem to need to know about the earlier spamhaus portion of the line to work, removed.
  - Better test case descriptions.
  - Improved log matching via standard method that better documents the expected triplet under test.
  - Removed a redundant whitelist file and test that didn't seem to have any relevance. Added a TODO with additional notes about a concern with these tests.
  - Reduced test time as 8 second timeouts from `-w 8` don't appear to be required, better to poll with grep instead.
  - Replaced `wc -l` commands with a new method to assert expected line count, better enabling assertions on the actual output.

- `undef_spam_subject`:
  - Split to two separate test cases, and initialize each container in their case instead of `setup_file()`, allowing for using the default `teardown()` method (and slight benefit if running in parallel).

- `permit_docker`:
  - Not a parallel test, but I realized that the repeat helper methods don't necessarily play well with `run` as the command (can cause false positive of what was successful).
2023-01-06 16:50:09 +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 tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +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 tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +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(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +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 refactor: Parallel Tests 2023-01-06 16:50:09 +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 tests: Use mail.example.test as common container hostname (#2975) 2023-01-04 16:24:08 +01:00
tests.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00