docker-mailserver/test
Brennan Kinney 05db27f817
tests(refactor): Extract mail account management tests from tests.bats (#3055)
* chore: Extract out accounts test cases from `tests.bats`

Standard test file format, the test cases have been copied over unmodified.

* chore: Revise test case descriptions

* tests(refactor): `accounts.bats`

Revised test cases:
- Some common test case logic extracted to test methods.
- Update direct user management commands to use the `setup email ...` variants.
- Improved assertions.
- Removed `sleep 2` lines as the need for that is ambiguous (may no longer be relevant?)
- Additional commentary for maintaining
- Two test cases for missing `postfix-accounts.cf` opted to just run the image without any volumes instead, as the `without-accounts/` folder  was empty anyway. 2nd test case can instead use a single `docker run` to check  the newly created`postfix-accounts.cf` content.
- `test/config/without-accounts/` remains as `open_dkim.bats` presently uses it.

* chore: Remove unnecessary account removal assert

Traced this back to the original PR where it appears to have been a typo and was probably intended as a cleanup on the `user4` account. Not necessary, removing.

* chore: Rename `accounts.bat` -> `account_management.bats`

---------

* feedback: Avoid `ls` for detecting directories

Replace `ls -d` approach from original test cases

Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>

* feedback: Remove asserting empty output on failure

Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2023-02-03 22:52:30 +00:00
..
bats@e8c840b58f update BATS & helper + minor updates to BATS variables (#2988) 2023-01-09 08:54:04 +01:00
config tests(refactor): mail_fetchmail.bats + co-locate test cases for processes (#3010) 2023-01-18 14:42:55 +13:00
docker-openldap formatting files according to standard (#1619) 2020-09-24 14:54:21 +02:00
helper tests(refactor): Extract mail account management tests from tests.bats (#3055) 2023-02-03 22:52:30 +00:00
linting Linting: bump shellcheck version to 0.9.0 (#3041) 2023-01-30 11:30:27 +00:00
test-files feature: provide better rspamd suppport (#3016) 2023-01-25 10:28:59 +01:00
test_helper tests(refactor): Adjust mail_changedetector + change detection helpers (#2997) 2023-01-16 20:39:46 +13:00
tests tests(refactor): Extract mail account management tests from tests.bats (#3055) 2023-02-03 22:52:30 +00:00