docker-mailserver/target/scripts
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
..
startup tests: Refactored bounced spam test + Introduce common container setup template (#2198) 2021-09-20 19:35:03 +12:00
check-for-changes.sh Lock file create and remove improvements (#2183) 2021-09-13 20:09:01 +12:00
fail2ban-wrapper.sh Final Migration Step (#6) 2021-01-16 10:16:05 +01:00
helper-functions.sh scripts: merge new setup.sh version for 10.2.0 again (#2189) 2021-09-19 16:47:08 +02:00
postfix-wrapper.sh setup.sh: docker_container first, then fall back to docker_image (#2134) 2021-09-06 10:13:12 +00:00
postsrsd-wrapper.sh HOSTNAME and DOMAINNAME setting improvements (#2175) 2021-09-12 02:20:16 +12:00
quota-warning.sh Final Migration Step (#6) 2021-01-16 10:16:05 +01:00
start-mailserver.sh HOSTNAME and DOMAINNAME setting improvements (#2175) 2021-09-12 02:20:16 +12:00
update-check.sh Update check (#1951) 2021-05-19 21:18:06 +02:00