mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat: support LOG_CONFIG environment variable
This variable allows users to override the logging.conf used for Python logging configuration. By default, this is set to logging.conf, which is a production config. LOG_CONFIG is treated relative to [options] aurwebdir. This patch allows us to specify the logging config as opposed to copying over logging.conf in our test docker and gitlab test scripts, as well as ease-of-testing as a developer. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
7f1de72e08
commit
7bcc8d7ce7
6 changed files with 16 additions and 12 deletions
|
@ -10,6 +10,7 @@ variables:
|
|||
DB_HOST: localhost
|
||||
TEST_RECURSION_LIMIT: 10000
|
||||
CURRENT_DIR: "$(pwd)"
|
||||
LOG_CONFIG: logging.test.conf
|
||||
|
||||
test:
|
||||
stage: test
|
||||
|
@ -26,15 +27,14 @@ test:
|
|||
- cp -v conf/config.dev conf/config
|
||||
- sed -i "s;YOUR_AUR_ROOT;$(pwd);g" conf/config
|
||||
- ./docker/test-mysql-entrypoint.sh # Create mysql AUR_CONFIG.
|
||||
- cp -vf logging.test.conf logging.conf # Put test logging config in place.
|
||||
- make -C po all install # Compile translations.
|
||||
- make -C doc # Compile asciidoc.
|
||||
- make -C test clean # Cleanup coverage.
|
||||
script:
|
||||
# Run sharness.
|
||||
- make -C test sh # sharness tests use sqlite.
|
||||
- make -C test sh
|
||||
# Run pytest.
|
||||
- pytest # Run pytest suites.
|
||||
- pytest
|
||||
- make -C test coverage # Produce coverage reports.
|
||||
- flake8 --count aurweb # Assert no flake8 violations in aurweb.
|
||||
- flake8 --count test # Assert no flake8 violations in test.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue