Commit Graph
52 Commits
Author SHA1 Message Date
Antoine Nguyen 8ee4095b3c Try to set timezone on the host. 2021-06-17 16:04:04 +02:00
Antoine Nguyen 10dd93d3f7 Try in django settings. 2021-06-17 15:57:15 +02:00
Antoine Nguyen 3d4558d3e2 Fixed tests settings. 2021-06-17 15:27:18 +02:00
Antoine Nguyen ec737efc26 Cleanup and unit tests. 2021-06-03 09:02:55 +02:00
Antoine Nguyen 8aa155b6a6 Fixed unit test. 2021-05-31 21:35:49 +02:00
Antoine Nguyen f6915deccc Merge branch 'master' into refacto/vuejs_interface 2020-11-13 14:20:46 +01:00
Antoine Nguyen b9720c1837 Fixed unit tests. 2020-11-10 16:07:34 +01:00
Antoine Nguyen e4f5a25e64 Added missing test config. 2020-11-09 21:56:48 +01:00
02efd7f0e3 POC replace travis by Github Actions (#2066)
* POC replace travis by Github Actions

* add libldap2-dev

* add libsasl2-dev libssl-dev

* Delete .travis.yml

* Add specific configuration for PostgreSQL

* Retrieve PostgreSQL or MySQL port from env var

* Print affected port for the docker service

* Add Database type and dburl

* Fix dbtype

* Use environment variable to define the port in use for tests.

* Configured password for postgres connection.

* Added redis service.

* Enabled OpenLDAP service.

* Use a container for OpenLDAP too.

* Removed wrong option.

* Fixed volume syntax.

* Try using the option directly.

* Try using an absolute path.

* Fixed wrong syntax.

* Try different format for env variable.

* Try a different way to load data.

* Added missing method call.

* Fix envar

* Try to wait a bit before starting tests.

* Display openldap service logs.

* Fixed ldif scripts path.

* Try to use a custom docker image.

* Try to provide credentials.

* Try with github token.

* use main reference

* Changed LDAP Admin password.

* Added debug.

* Added more debug

* Removed debug.

* dd test for MySQL

* Fix name

* Test is independant

* Link build

* add envar DB for MySQL

* remove depends

* fix fast failed

* fix mysql user

* Use 127.0.0.1 to force for IPv4

* For parameters for MySQL

* Database name test_modoboa

* change mysql user to launch test

* Move to the last mysql version

lose connection on 5.7

* TEst some timout parameters

* remove bad parameters

* Add CONN_MAX_AGE parameters

* Add docker logs

* Try to reset db connections before we spawn processes.

* POC replace travis by Github Actions

* add libldap2-dev

* add libsasl2-dev libssl-dev

* Delete .travis.yml

* Add specific configuration for PostgreSQL

* Retrieve PostgreSQL or MySQL port from env var

* Print affected port for the docker service

* Add Database type and dburl

* Fix dbtype

* Use environment variable to define the port in use for tests.

* Configured password for postgres connection.

* Added redis service.

* Enabled OpenLDAP service.

* Use a container for OpenLDAP too.

* Removed wrong option.

* Fixed volume syntax.

* Try using the option directly.

* Try using an absolute path.

* Fixed wrong syntax.

* Try different format for env variable.

* Try a different way to load data.

* Added missing method call.

* Fix envar

* Try to wait a bit before starting tests.

* Display openldap service logs.

* Fixed ldif scripts path.

* Try to use a custom docker image.

* Try to provide credentials.

* Try with github token.

* use main reference

* Changed LDAP Admin password.

* Added debug.

* Added more debug

* Removed debug.

* dd test for MySQL

* Fix name

* Test is independant

* Link build

* add envar DB for MySQL

* remove depends

* fix fast failed

* fix mysql user

* Use 127.0.0.1 to force for IPv4

* For parameters for MySQL

* Database name test_modoboa

* change mysql user to launch test

* Move to the last mysql version

lose connection on 5.7

* TEst some timout parameters

* remove bad parameters

* Add CONN_MAX_AGE parameters

* Add docker logs

* Try to reset db connections before we spawn processes.

* Add relase on pypi (test server first)

* Fix setuptools scm to fix upload on Pypi test

* Retrieve all repos when publish on pypi

* if file exists, skip it

* Deploy only on master

* Added python 3.5 in matrix.

* Removed comments.

* Add translation and codecov

* Missing argument for upload in production

* fix bad indentation

* move codecov

* Codecov only in one build

* fix command

* Try to run codecov after PG tests.

* Fixed expressions syntax.

* Fixed path issue.

* Fixed path issue.

* Try workflow_run statement.

* Removed useless triggers.

* Test trigger on one workflow

* Another test

* Exclude master and main branch

* Regroup all steps in one workflow.

* Fixed typo

* Fixed bad syntax

* Added missing requirement.

* Push on Pypi Test only on master branch

Co-authored-by: Antoine Nguyen <tonio@ngyn.org>
2020-11-09 20:44:48 +01:00
Antoine Nguyen 00a112dbcb Merge branch 'master' into refacto/vuejs_interface 2020-10-21 16:43:38 +02:00
Michael CramerandGitHub 68dad785d6 Polish and Fixing issues when using "docker-compose up" (#2039)
* add missing dependencies to be able to use docker

without these dependencies, the `docker-compose up` command is failing
- `rrdtool-dev` and `librrd` when building `rrdtool-0.1.15.tar.gz`
- `make` and `file` when building `gevent-1.5.0.tar.gz`

* disable secure cookies for being able to login when docker is used with runserver (there is no ssl)

* run develop command to avoid a hard failure after login when using the docker image (version check is performed but pkg_resources is not able to find modoboa distribution)

* polish multi stage docker build (adding missing dependencies for pip install and when running the application); use a virtual environment which is shared between the stages by using a base image and others will extend this
2020-10-21 15:44:08 +02:00
Antoine NguyenandGitHub a40d46db94 Feature/tfa (#2037)
* WIP: two-factor authentication.

* Added support for 2FA using TOTP devices.

see #1760 #1672 #1455

* Added documentation.

* Updated documentation.

* Added missing qrcode requirement.

* Fixed unit tests.
2020-10-21 10:42:56 +02:00
Antoine Nguyen 8898eda7c4 Merge branch 'master' into refacto/vuejs_interface 2020-10-07 10:14:27 +02:00
Antoine NguyenandGitHub 3df446f657 Moving back the stats module to the core. (#2011)
* Moving back the stats module to the core.

* Added system packages to build RRDtool.

* Fixed unit tests.

* Improved coverage.
2020-09-17 16:02:39 +02:00
Antoine Nguyen 57d68390c5 Added greenlet support for coverage. 2020-06-17 12:03:12 +02:00
Antoine Nguyen 12399a5fad Trying to fix coverage report. 2020-06-15 18:57:21 +02:00
Antoine Nguyen f3e1f405d5 Moved coverage option to config file. 2020-06-15 14:30:06 +02:00
Antoine Nguyen 4053204c38 WIP: new policy daemon. 2020-06-12 17:59:06 +02:00
ClemRiviere e2492a08b0 Code improvements 2020-04-15 15:05:57 +02:00
ClemRiviere 8df80cc5b2 Updating test_project settings 2020-04-15 13:32:50 +02:00
jeromelebleuandGitHub 916b4a2367 Update settings template and test_project's one (#1830) 2020-02-27 10:27:22 +01:00
Jérôme LebleuandAntoine Nguyen db12a4aeef test: skip ldapsync if it is not available 2020-01-07 09:34:39 +01:00
Antoine NguyenandGitHub ab592c3d02 LDAP synchronization process (#1732)
* Initial commit for LDAP sync process.

* Fixed unit tests.

* Added doc and run ldapsync tests on travis.

* Removed server address.

* Force bytes when calling ldap methods.

* Fixed tests compat with python2.

* Do not force bytes here.

* Force bytes.

* Force bytes for attribute names too.

* Disable bytes mode in PY2.

* Handle account removals.

* Fixed unit tests.

* Limit sync to simple users.

* Fixed unit test.

* Fixed unit test.
2019-05-07 10:48:00 +02:00
Antoine Nguyen 277602e3f0 New DNS checks.
see #1618
2018-11-19 18:54:12 +01:00
Antoine Nguyen 9bebc8b04e Few fixes. 2018-10-05 14:06:59 +02:00
Antoine Nguyen 09c2ce7972 Updated test config. 2018-10-05 14:06:59 +02:00
Antoine Nguyen 185dc090f5 Removed useless file. 2018-10-04 16:59:16 +02:00
Antoine Nguyen e83c566c1d Revert wrong changes. 2018-10-04 10:09:32 +02:00
Antoine Nguyen 9a0a5a96af Added docker-compose file for development. 2018-08-19 17:07:27 +02:00
Andrew Fyfe 87e8a32063 whitespace fixes 2018-02-03 00:59:06 +00:00
Andrew Fyfe 24a7ca6a9e sort imports using isort
pip install isort
isort -y
2018-02-03 00:43:59 +00:00
Andrew Fyfe 8a1d5736c9 fix quotes
This ensures all files use " for quotes with the exception of
migrations, as this are auto generated I've not modified them.

pip install unify
unify --in-place --recursive --quote \" .
2018-02-03 00:43:58 +00:00
Andrew Fyfe 042d0a8501 add IPv6 support to mx check
- add support for looking up IPv6 addresses (socket.getaddrinfo)
- add support for International Domain Names in case the DNS reponse contains one, to_unicode() decodes them to a utf8 string
- add logging for potential configuration errors:
    - DNS configuration errors (i.e. no MX records)
    - server name resolution errors (i.e. resolv.conf doesn't contain a working name server)
    - invalid values in MX records
- when looking up an ip address, don't stop on the first failure check all addresses
- update mock results for tests, return a real MX record for mock dns queries
2018-01-04 21:52:02 +00:00
Andrew Fyfe 92963a0f4c update test_project files
synced with a fresh deployment using django 1.11.8
2017-12-19 01:24:15 +00:00
Andrew Fyfe 892160d5aa updates for django 1.11 support
- MIDDLEWARE_CLASSES is replaced by MIDDLEWARE

- add MiddlewareMixin to modoboa middlewares

- on_delete will become a required parameter for ForeignKey()
  set it to the current default CASCADE

- on_delete will become a required parameter for OneToOneField()
  set it to the current default CASCADE

- reverse and reverse_lazy have moved to django.urls

- RadioChoiceInput widget has been removed, replace with HorizontalRadioSelect
2017-12-19 00:50:53 +00:00
Antoine NguyenandGitHub 98eea782a0 Generic transport editor. (#1309)
Generic transport editor.

see #1301

* Fixed unit test.

* Added unit tests.

* Fixed unit test.

* Added transport module to test list.

* Moved relay transport backend to appropriate app.

see #1301

* Added missing file.
2017-11-27 10:42:27 +01:00
Antoine Nguyen c236d60bd9 Replaced django-passwords by django's builtins.
see #1153
2017-06-22 15:53:58 +02:00
Arthur Vuillard 615f73f272 unicode_literals everywhere and modoboa-admin deploy fixes 2017-05-11 09:25:42 +02:00
Antoine Nguyen 78da3240fb Fixed test settings.
see #1078
2017-03-16 12:08:10 +01:00
Antoine Nguyen 183723c609 Fixed test urls.
see #1024
2017-02-10 14:45:43 +01:00
Antoine Nguyen ee71016b69 Fixed test settings.
see #1024
2017-02-10 14:39:57 +01:00
Antoine Nguyen adf4750c1f Fixed tests configuration.
see #989
2017-01-18 13:57:41 +01:00
Antoine Nguyen d1b59cc312 WIP
see #951
2016-10-28 15:48:08 +02:00
Christian Wiegand 0fd1fafef3 Changed string delimiters form ' to ". Moved the webmail locale datetime formatting settings to new settings.py in webmail module. 2016-10-06 15:53:44 +02:00
Christian Wiegand 169d07b8fa localization of email headers, added the datetime format settings in test_project settings.py with some docs 2016-10-06 14:49:16 +02:00
Gael Pasgrimaud c87240eefb allow to use tox to run tests/serve locally in an easy way 2016-09-13 11:47:21 +02:00
Antoine Nguyen 489327dda6 Fix test settings.
see #867
2016-04-29 14:09:34 +02:00
Gael Pasgrimaud 101a773bfd introduce test_settings 2016-03-10 12:46:44 +01:00
Gael Pasgrimaud 6b6e16d073 run tests with mysql 2016-03-07 14:54:52 +01:00
Antoine Nguyen c4ec4f447c Update test config. 2015-11-27 14:53:53 +01:00