Граф коммитов

15 Коммитов

Автор SHA1 Сообщение Дата
Ed Morley 8fae27955a Revert "Bug 1333079 - Switch to new style Celery setting names"
This reverts commit 1db3e2baf4.
2017-02-01 16:28:55 +00:00
Ed Morley 1db3e2baf4 Bug 1333079 - Switch to new style Celery setting names
Converted using:

celery upgrade settings treeherder/config/settings.py --django
celery upgrade settings tests/settings.py --django

As suggested by:
http://celery.readthedocs.io/en/latest/whatsnew-4.0.html#lowercase-setting-names

(I manually reverted the env variable name back to simplify deployment,
we can always clean these up later.)

The Django integration in celery.py has been cleaned up by following:
https://celery.readthedocs.io/en/latest/django/first-steps-with-django.html
2017-02-01 14:11:45 +00:00
Ed Morley f397b9819b Bug 1326207 - Replace Django system check hack with --fail-level
Django 1.10 added a new `--fail-level` option that allows overriding the
default of only exiting 1 for ERROR and above, avoiding the need to rely
on awk hacks:
https://docs.djangoproject.com/en/1.10/ref/django-admin/#check
2017-01-10 20:39:37 +00:00
Ed Morley 9e20b7934d Bug 1247344 - Enable Django system checks during testing and deployment
`manage.py check --deploy` is now run during Travis testing and as part
of stage/prod/Heroku deployment. It checks for a number of common
configuration mistakes & ensures security best practices are being
followed:
https://docs.djangoproject.com/en/1.8/ref/checks/
2016-05-06 16:09:11 +01:00
James Graham 5ff72285c4 Bug 1255087 - Create a lint for ensuring that the heroku Procfile contains the same queues as CELERY_QUEUES in the settings file 2016-03-16 17:46:16 +00:00
Mauro Doglio 5930b4f4c1 Bug 1193836 - Use pytest-django to run tests
pytest-django doesn't setup a test database for every single test, but
only for those tests that actually require a db. Tests that require a db
need to either be marked with `@pytest.mark.django_db` or use a fixture
that has a dependency on `db` or `transactional_db`.
Using a non transactional db would make tests execution much faster, but
unfortunately it doesn't play well with the treeherder datasource
creation so I used a transactional_db.

pytest-django also allows you to specify a settings file to use for
tests in a pytest.ini file, which is nicer than monkeypatch the original
settings file in the pytest session start function 😃.
2015-10-27 11:19:13 +00:00
Mauro Doglio 247cc3de64 Bug 1193836 - Use a dedicated settings file for testing 2015-10-27 11:18:19 +00:00
Ed Morley 5d3bce9802 Bug 1058531 - Don't enable pytest coverage checker in runtests.sh
It shouldn't be enabled by default IMO. For better overall visibility,
we should be using something like coveralls or codeclimate.
2015-10-14 18:30:02 +01:00
Ed Morley c554745a2c Bug 1192957 - Add isort to the Travis run
Any import style deviations will cause the Travis run to fail, with the
diff output to the Travis log.
2015-10-02 17:55:29 +01:00
Ed Morley 90ba77e596 Bug 1192801 - Remove per-file MPL boilerplate since it's unnecessary
The MPL 2.0 terms state that as long as a LICENSE file is present, the
per-file header text is not required. See "Exhibit A" at the end of:
https://www.mozilla.org/MPL/2.0/
2015-08-18 23:32:11 +01:00
Jonathan French 19b71bc4b4 Bug 1164881 - Add MPL2.0 headers to recent treeherder repo files 2015-05-14 11:45:26 -04:00
Ed Morley 30d6576b43 Bug 1139894 - Add flake8 to runtests.sh
flake8 is run on Travis, so let's make it harder to forget to run
locally for people who use runtests.sh. Eventually we should move all of
this to setup.py.
2015-03-16 12:16:17 +00:00
Jonathan French dbb4d11e09 Bug 1090689 - Add MPL2.0 headers to the repo 2014-11-03 13:06:03 -05:00
mdoglio eb11feeace add db setup/teardown to py.test suite 2013-03-19 19:05:04 +00:00
mdoglio a2b0a00fcb add py.test setup with support for coverage 2013-03-11 20:01:17 +00:00