mirror of
https://github.com/bokysan/docker-postfix.git
synced 2024-11-10 08:55:39 +08:00
9b1902c047
Summary ^^^^^^^ This commit refactors the code base to be more manageble and prepares the groundwork for tests. Refactoring ^^^^^^^^^^^ Files are now moved to subdirectories, all for the sole purpose of easier management. Tests live in their own folders, as well as configs and other files. Test framework ^^^^^^^^^^^^^^ Two new important scripts/directories are available: - `unit-tests.sh` / `/unit-test` which executes unit tests across shell scripts, and - `integration-test.sh` / `integration-tests`, which spins up the container and tries to send the email. Both tests use the [BATS](https://github.com/sstephenson/bats) framework for testing. To create a new test, simply drop a `.bats` file into a corresponding directory. Functions have been extracted into `common-run.sh`, to be able to test them independently. DKIM_SELECTOR ^^^^^^^^^^^^^ It is now possible to specify a DKIM selector to use (instead of the default "mail"). See `README.md` for more details. JSON logging ^^^^^^^^^^^^ WIP: rsyslog will now output JSON logs. This is especially important if you plan on deploying the image into Kubernetes, as [Prometheus](https://prometheus.io/) can handle logs in JSON much easier. TODO: Make this an optional feature, to not confuse existing users.
25 lines
No EOL
511 B
INI
25 lines
No EOL
511 B
INI
# http://editorconfig.org
|
|
root = true
|
|
indent_size = 2
|
|
charset = utf-8
|
|
trim_trailing_whitespace = true
|
|
insert_final_newline = true
|
|
end_of_line = lf
|
|
max_line_length = 120
|
|
|
|
# Indent shell scripts with tabs
|
|
[**.sh,**.bats]
|
|
indent_style = tab
|
|
|
|
# Indent YAML files with spaces
|
|
[**.yaml,**.yml]
|
|
indent_style = space
|
|
|
|
# The JSON files contain newlines inconsistently
|
|
[*.json]
|
|
insert_final_newline = ignore
|
|
|
|
# Minified JavaScript files shouldn't be changed
|
|
[**.min.js]
|
|
indent_style = ignore
|
|
insert_final_newline = ignore |