docker-mailserver/test/tests/serial
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
..
mail_pop3.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(refactor): mail_fetchmail.bats + co-locate test cases for processes (#3010) 2023-01-18 14:42:55 +13:00
mail_with_relays.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00
no_container.bats ci: move tests than can be run in parallel now (#3038) 2023-01-30 09:19:47 +01:00
open_dkim.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00
permit_docker.bats tests: refactor 4 more tests (#3018) 2023-01-24 09:21:39 +01:00
sedfile.bats tests(chore): Use REPOSITORY_ROOT export var from Makefile 2022-11-26 14:52:42 +13:00
test_helper.bats tests(refactor): Adjust mail_changedetector + change detection helpers (#2997) 2023-01-16 20:39:46 +13:00
tests.bats tests(refactor): Extract mail account management tests from tests.bats (#3055) 2023-02-03 22:52:30 +00:00