Fix crontest config, polish Makefile
This commit is contained in:
parent
7fe52ae8b5
commit
9b5c43b769
20
Makefile
20
Makefile
|
@ -7,17 +7,23 @@
|
||||||
#
|
#
|
||||||
# make test PYTHON=/usr/local/bin/python3.8
|
# make test PYTHON=/usr/local/bin/python3.8
|
||||||
#
|
#
|
||||||
# This marco is passed via environment to test/e2e_test.py, where it's
|
# This macro is passed via environment to test/e2e_test.py, where it's
|
||||||
# used to compute further commands.
|
# used to compute further commands.
|
||||||
#
|
#
|
||||||
PYTHON = python
|
PYTHON = python
|
||||||
|
|
||||||
|
#
|
||||||
|
# SQLite database used during tests
|
||||||
|
#
|
||||||
|
# This database stores key queue and identity repository for e2etest,
|
||||||
|
# daemontest, and crontest.
|
||||||
|
#
|
||||||
TEST_DB = test/lacre.db
|
TEST_DB = test/lacre.db
|
||||||
|
|
||||||
#
|
#
|
||||||
# Main goal to run tests.
|
# Main goal to run all tests.
|
||||||
#
|
#
|
||||||
test: e2etest unittest daemontest crontest
|
test: e2etest daemontest unittest crontest
|
||||||
|
|
||||||
#
|
#
|
||||||
# Run a set of end-to-end tests.
|
# Run a set of end-to-end tests.
|
||||||
|
@ -37,7 +43,8 @@ e2etest: test/tmp test/logs pre-clean restore-keyhome
|
||||||
# it slurps the right config.
|
# it slurps the right config.
|
||||||
#
|
#
|
||||||
crontest: clean-db $(TEST_DB)
|
crontest: clean-db $(TEST_DB)
|
||||||
GPG_MAILGATE_CONFIG=test/gpg-mailgate-cron-test.conf PYTHONPATH=`pwd` $(PYTHON) webgate-cron.py
|
GPG_MAILGATE_CONFIG=test/gpg-mailgate-cron-test.conf PYTHONPATH=`pwd` \
|
||||||
|
$(PYTHON) webgate-cron.py
|
||||||
|
|
||||||
$(TEST_DB):
|
$(TEST_DB):
|
||||||
$(PYTHON) test/utils/schema.py $(TEST_DB)
|
$(PYTHON) test/utils/schema.py $(TEST_DB)
|
||||||
|
@ -45,7 +52,7 @@ $(TEST_DB):
|
||||||
#
|
#
|
||||||
# Run an e2e test of Advanced Content Filter.
|
# Run an e2e test of Advanced Content Filter.
|
||||||
#
|
#
|
||||||
daemontest:
|
daemontest: restore-keyhome
|
||||||
$(PYTHON) test/daemon_test.py
|
$(PYTHON) test/daemon_test.py
|
||||||
|
|
||||||
# Before running the crontest goal we need to make sure that the
|
# Before running the crontest goal we need to make sure that the
|
||||||
|
@ -65,6 +72,7 @@ pre-clean:
|
||||||
|
|
||||||
restore-keyhome:
|
restore-keyhome:
|
||||||
git restore test/keyhome
|
git restore test/keyhome
|
||||||
|
git restore test/keyhome.other
|
||||||
|
|
||||||
test/tmp:
|
test/tmp:
|
||||||
mkdir test/tmp
|
mkdir test/tmp
|
||||||
|
@ -72,5 +80,5 @@ test/tmp:
|
||||||
test/logs:
|
test/logs:
|
||||||
mkdir test/logs
|
mkdir test/logs
|
||||||
|
|
||||||
clean: pre-clean
|
clean: pre-clean clean-db
|
||||||
rm -rfv test/tmp test/logs
|
rm -rfv test/tmp test/logs
|
||||||
|
|
|
@ -10,6 +10,10 @@ keyhome = test/keyhome
|
||||||
[smime]
|
[smime]
|
||||||
cert_path = test/certs
|
cert_path = test/certs
|
||||||
|
|
||||||
|
[daemon]
|
||||||
|
host = not_used
|
||||||
|
port = not_used
|
||||||
|
|
||||||
[database]
|
[database]
|
||||||
enabled = yes
|
enabled = yes
|
||||||
url = sqlite:///test/lacre.db
|
url = sqlite:///test/lacre.db
|
||||||
|
@ -20,6 +24,7 @@ port = 2500
|
||||||
|
|
||||||
[cron]
|
[cron]
|
||||||
send_email = no
|
send_email = no
|
||||||
|
mail_templates = not_used
|
||||||
|
|
||||||
[enc_keymap]
|
[enc_keymap]
|
||||||
alice@disposlab = 1CD245308F0963D038E88357973CF4D9387C44D7
|
alice@disposlab = 1CD245308F0963D038E88357973CF4D9387C44D7
|
||||||
|
|
Loading…
Reference in New Issue