1
0
mirror of https://github.com/tomav/docker-mailserver.git synced 2024-06-27 19:55:40 +02:00
docker-mailserver/test/helper
Brennan Kinney 32cc9d30e5 tests(refactor): common.bash helper split into two files
The current `test/test_helper/common.bash` was getting large. Setup logic has been extracted out into a new file.

`common.bash` resides in a directory  named `test_helper/`, the `test_` prefix is redundant. 

As an interim solution this provides a new approach for the updated tests, while the "old" tests can use the "old" `common.bash`. Eventually all tests should migrate to the new approach in `helper/` instead of the older `test_helper/`.

The new helper files are located under `test/helper/` (_which drops the `test_` prefix_). The new and updated helpers apply the new naming convention for ENV variables (_such as `CONTAINER_NAME` or `IMAGE_NAME`_).

---

Some refactoring occurred, including new methods like `_run_in_container()` and `_default_teardown()`.

---

I encountered a situation before in which the updated tests would fail because there were collisions of ENV names in the tests (_for example with `CONTAINER_NAME`_).
2022-11-26 14:52:42 +13:00
..
common.bash tests(refactor): common.bash helper split into two files 2022-11-26 14:52:42 +13:00
setup.bash tests(refactor): common.bash helper split into two files 2022-11-26 14:52:42 +13:00