docker-mailserver/target/scripts/startup
Brennan Kinney f4f0e4ef61
tests: Refactored bounced spam test + Introduce common container setup template (#2198)
* fix: Spam bounced test copy/paste typo
* tests(docs): Expand inline documentation

Should assist maintainers like myself that are not yet familiar with this functionality, saving some time :)

* Refactor bounced test + Introduce initial container template

DRY'd up the test and extracted a common init pattern for other tests to adopt in future.

The test does not need to run distinct containers at once, so a common name is fine, although the `init_with_defaults()` method could be given an arg to add a suffix: `init_with_defaults "_${BATS_TEST_NUMBER}"` which could be called in `setup()` for tests that can benefit from being run in parallel.

Often it seems the containers only need the bare minimum config such as accounts provided to actually make the container happy to perform a test, so sharing a `:ro` config mount is fine, or in future this could be better addressed.

---

The test would fail if the test cases requiring smtp access ran before postfix was ready (_only a few seconds after setup scripts announce being done_). Added the wait condition for smtp, took a while to track that failure down.
2021-09-20 19:35:03 +12:00
..
check-stack.sh fix: Remove mkcert.sh usage + _setup_ssl refactor. (#2196) 2021-09-20 00:31:11 +12:00
daemons-stack.sh Update check (#1951) 2021-05-19 21:18:06 +02:00
fixes-stack.sh do not delete supervisord.pid (#2044) 2021-06-19 14:01:38 +02:00
misc-stack.sh start-mailserver.sh split (#1820) 2021-02-23 20:03:01 +01:00
setup-stack.sh tests: Refactored bounced spam test + Introduce common container setup template (#2198) 2021-09-20 19:35:03 +12:00