Commit Graph

62 Commits

Author SHA1 Message Date
Benjamin Dauvergne d41a4e3409 multitenant: use real tenant in migration commands (#48071) 2020-10-29 16:32:57 +01:00
Lauréline Guérin 3ead547aa1
settings: remove old MIDDLEWARE_CLASSES support (#45671)
gitea-wip/hobo/pipeline/head There was a failure building this commit Details
gitea/hobo/pipeline/head There was a failure building this commit Details
2020-10-13 09:31:15 +02:00
Benjamin Dauvergne e1647d8f56 debian: add InternalIpMiddleware (#29149)
It sets DEBUG=True when current request IP is in settings.INTERNAL_IPS.
2020-08-25 10:37:36 +02:00
Benjamin Dauvergne afe4b98f64 debian: add debug log in /var/log/<app>/debug (#29149)
It's configured through the DEBUG_LOG settings:
* DEBUG_LOG = False, no debug log
* DEBUG_LOG = True, all debug log go to /var/log/<app>/debug
* DEBUG_LOG = app1,app2, only debug log of logger app1 and app2
  go to /var/log/<app>/debug

/var/log/<app>/debug is emptied everyday at midnight.
2020-08-25 10:37:34 +02:00
Nicolas Roche 7ce95390ac tests: insert log filter on correct handler (#45615) 2020-07-31 17:12:46 +02:00
Thomas NOËL ad23d09e3a multitenant: show domain and schema in tenant object str method (#45343) 2020-07-28 15:18:08 +02:00
Valentin Deniaud 88c06f1df0 agent: save role emails during provisionning (#44754) 2020-07-10 16:26:36 +02:00
Benjamin Dauvergne c448546dbe py3: adapt support of multitenant in threads (#44021) 2020-06-15 16:17:00 +02:00
Benjamin Dauvergne 6361be78c9 tests_multitenant: test threading.Timer (#44021) 2020-06-15 11:56:59 +02:00
Frédéric Péters 0012761656 general: use HTTP API to provision users & groups (#43245) 2020-05-29 12:24:18 +02:00
Benjamin Dauvergne edc35406cc tests_multitenant: fix non deterministic behaviour 2020-04-20 23:58:43 +02:00
Benjamin Dauvergne 2b0474a2e9 tests_multitenant: mock journald sender (#41250) 2020-04-15 08:13:44 +02:00
Nicolas Roche 59b3228dcb python3: celery now handle text (#40288) 2020-03-04 15:27:34 +01:00
Nicolas Roche 8f8b71736b tests: add test to agent worker (#40098) 2020-02-28 15:41:22 +01:00
Nicolas Roche df22a989c9 tests: add test to tenant management commands (#40098) 2020-02-28 15:41:20 +01:00
Nicolas Roche cf72237413 python3: decode HttpResponse content (#40012) 2020-02-28 15:07:01 +01:00
Nicolas Roche 53b81ec6ab python3: replace dict.iteritems() by items() (#40012) 2020-02-28 15:07:01 +01:00
Nicolas Roche 825939d23b tests: adapt strings encoding to run tests in python3 (#40012) 2020-02-28 15:07:01 +01:00
Nicolas Roche 6da1e63aab tests: adapt import builtins to run tests in python3 (#40012) 2020-02-28 15:07:01 +01:00
Lauréline Guérin b6237a23df
tenants: add command showmigrations_schemas (#37683) 2019-11-21 20:19:26 +01:00
Benjamin Dauvergne c178320985 debian: use MIDDLEWARE in debian_config_common.py (#36584) 2019-10-15 15:22:49 +02:00
Frédéric Péters 05c9c1bf5d tests: changed mocked "file()" to mocked "open()", everywhere (#36216) 2019-09-18 11:10:09 +02:00
Nicolas Roche 090fc5b8de hobo_deploy: allow several templates for user/agent combo portals (#33876) 2019-08-22 10:27:06 +02:00
Benjamin Dauvergne 11c79a9770 tenant_command: convert exception to UTF-8 (#30559) 2019-07-15 22:49:48 +02:00
Benjamin Dauvergne 02b1ef8c2e do not use public schema for finding list of migrations (#31042) 2019-07-04 08:01:16 +02:00
Benjamin Dauvergne 5e1b5a1169 tests_multitenant: add test on settings.json reloading (#33563) 2019-06-04 16:41:54 +02:00
Benjamin Dauvergne 570722b01a code style (#33563) 2019-06-04 16:41:54 +02:00
Benjamin Dauvergne 2263f59679 multitenant: wrap schema creation in atomic() (#23119) 2019-03-18 15:01:11 +01:00
Benjamin Dauvergne f76a6a84e8 use BRANCH_NAME for naming test databases (#31337) 2019-03-18 11:53:15 +01:00
Frédéric Péters 7aa49fcf12 misc: look for portal agent associated to user OU when in Authentic (#29658) 2019-02-06 10:30:11 +01:00
Benjamin Dauvergne ffaeb45057 debian: add journald support to debian_config_common (fixes #23471) 2019-01-15 00:15:18 +01:00
Benjamin Dauvergne 8b45ce4986 hobo: add setting loader for variables (#28930)
Variables must be prefixed with SETTING_, suffix .extend and .update are
supported.

Ex.: SETTING_LDAP_AUTH_SETTINGS.extend = [{...}]
2019-01-14 10:36:04 +01:00
Frédéric Péters 20da13f842 multitenant: use environment to get application name (#29323) 2018-12-24 09:20:00 +01:00
Frédéric Péters c9e094fb1c tests: adapt multitenant tests to pass whatever their order 2018-11-12 21:42:38 +01:00
Frédéric Péters 44dbfbeed8 multitenant: add loader to get settings from theme (#26636) 2018-11-12 20:13:34 +01:00
Benjamin Dauvergne c37e528757 multitenant: implement .extend and .update suffix for key in settings.json (#24700) 2018-07-03 16:14:01 +02:00
Benjamin Dauvergne ffa42d25cf Revert "misc: update for pytest 3.3, pytest-catchlog is no longer required"
pytest 3.4 restored previous behaviour of having only one root logger
handler.

This reverts commit 9dd347f926.
2018-06-18 11:48:18 +02:00
Emmanuel Cazenave fe017d9deb tests: dynamically change ALLOWED_HOSTS in multitenants tests 2018-04-04 15:14:23 +02:00
Benjamin Dauvergne 72ca424f10 multitenant: shorten schema names to stay within postgresql limits (#22494) 2018-03-13 16:57:50 +01:00
Frédéric Péters 9dd347f926 misc: update for pytest 3.3, pytest-catchlog is no longer required 2017-11-29 23:50:11 +01:00
Frédéric Péters 652683f737 settings loaders: update settings with unique cookie names (#18550) 2017-09-09 13:49:29 +02:00
Thomas NOËL 4643f93bbc hobo_notify: sync is_staff with is_superuser (#15977) 2017-05-17 11:36:03 +02:00
Frédéric Péters 1b306f5139 debian: add support for TEMPLATES in settings (#15958) 2017-05-02 15:56:34 +02:00
Jean-Baptiste Jaillet 1e1ee079bd multitenant: add delete_tenant command (#15513) 2017-03-31 12:34:41 +02:00
Benjamin Dauvergne ee4c8da606 tests: replace pytest-capturelog by pytest-catchlog
catchlog is a maintained fork of capturelog.
2017-03-22 23:36:23 +01:00
Frédéric Péters 4eaecb2f34 tests: declare new "secondary" key as expected (#13838) 2016-12-09 16:00:54 +01:00
Benjamin Dauvergne 96a60945e8 tests: stop checking for defaults parameters to Command.handle()
It depends on the version of Django, so it's better to ignore it.
2016-09-26 10:39:32 +02:00
Benjamin Dauvergne 66665d94ff tests: use a transactional db for multitenant tests 2016-09-26 10:39:25 +02:00
Frédéric Péters 3332602182 tests: check log record IP against the correct value (#13299) 2016-09-25 17:29:18 +02:00
Benjamin Dauvergne c710098857 tests: make test conform to log filter (fixes #11326) 2016-06-13 19:45:41 +02:00