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

123 Коммитов

Автор SHA1 Сообщение Дата
Christopher Grebs c2b7f30d24
Add autograph signing server support (#6865)
Fixes #6640
Fixes #6866

This pull request adds support for our new Autograph signing server, adds it to our dockerized services and adds tests that now actually call our signing server.

* Add a waffle-switch for calls to our new autograph signing server
* Add the autograph signing server to docker-compose
* Add the autograph signing server to our travis setup
* avoid us specifying the signing server settings everywhere in the code, one single source of truth
* more use of `responses` instead of mocking, leaning towards
  the future where we can actually hit a signing server instead
  of a mock
* disallow http requests generically, unless configured otherwise
* Add migration for waffle flag
2017-11-13 17:29:57 +01:00
Christopher Grebs 176383b168 Upgrade to Celery 4 (#6667)
* Update celery, config and dependencies to 4.x

* Remove usage of TaskSet, replace with group(), update `ampq`
* Enable redis on travis for better celery 4.x testing
* Fix lib/celery_tests
* Correct test testing email sending retrying on errors
* Fix celery subtask mocking errors.

* Fix celery broker url env variable

* Integrate watchdog for celery autoreload

* Ensure dependencies are updated for worker and web container.

* Restart all services after the dependency update

* Remove explicit celery loader environment variable.

* Restart all services in web and worker after running 'update_docker'

* Increase sleep time a bit
2017-10-16 11:16:41 +02:00
Mathieu Pillard 43d88b4f55 Revert "Upgrade to Celery 4 (#6625)"
This reverts commit 541688d5f2.

This caused some breakage on dev. We suspect it's because newrelic
hooks into the celery task launching code but does not support
celery 4.x yet.
2017-10-13 00:04:27 +02:00
Christopher Grebs 541688d5f2 Upgrade to Celery 4 (#6625)
* Update celery config to seamlessly upgrade to 4.x

* Update celery initialization for new configs and 4.x

* Update dependencies to celery 4.x

* Fix flake8

* Fix typo

* Remove usage of TaskSet, replace with group(), update `ampq`

* Enable redis on travis for better celery 4.x testing

* Fix more test setting names

* Fix lib/celery_tests

* Correct test testing email sending retrying on errors

* Fix celery subtask mocking errors.

* Fix new line

* Fix celery broker url env variable

* Integrate watchdog for celery autoreload

* Try something weird... ui-tests

* do we need extra hosts?

* more sleep?

* Try logging, try docker run to avoid port collisions

* More debugging

* Cleanup again

* Fix logs?

* Ensure dependencies are updated for worker and web container.

* Remove not functioning log saving for onw

* Restart all services after the dependency update
2017-10-12 21:05:21 +02:00
Christopher Grebs aa1fcbd435 Remove HIDDEN_LANGUAGES, sync with .po files and product-details. (#6536)
* Remove HIDDEN_LANGUAGES, sync with .po files and product-details.

Fixes #6534, Fixes #6535 

* Remove test referencing cy language, imho it doesn't make sense to have languages lying around in the code that aren't in product-details anyway, just adds another layer of writing things down needlessly

* Add comment about bidi languages

* Add test

* Remove fa-IR from languages, we never supported it in the past.

* Remove custom locales from test settings.
2017-10-04 08:35:31 +02:00
Christopher Grebs e483ea87cc Make sure we extract and analyze en-gb as english correctly. (#6218)
* Make sure we extract and analyze en-gb as english correctly.

Fixes #6156

* Add more tests verifying search behavior

* Actually run search from multiple locales

* Fix test settings to include en-GB and Spanish locales, use more unicode

* Fix flake8

* Fix fake language config
2017-08-23 11:06:30 +02:00
Christopher Grebs b90bf13922 Merge pull request #5791 from mozilla/1573-implement-django-jinja
Loads of clean-ups along the way.

Fixes #1573

* Moves all helpers modules to templatetags.jinja_helpers - there are a few things in there that aren't jinja related so there'll be a follow-up to split that later
* Update Jinja2 to 2.9.6
* Add django-jinja 2.3.1
* move some jingo-minify helpers to olympia.lib to avoid any jingo imports
* unified |f and |fe helpers into one |format_html helper that always escapes everything unless the input is already |safe

* Move helpers, add requirements, fix imports.
* Give backend a proper name
* Port f and fe filters from jingo
* Make start porting reviews jinja helpers module, make first test pass
* Get a handful more tests working, get rid of get_env, more and more jingo calls.
* Disable extension matching, render .txt templates too, fixes more stats tests
* Fix csv_header template to produce some reasonable and csv parsable
* Set trim_blocks to be compatible with jingo
* Unify |f and |fe into one |format that simplifies escaping rules. Update tests.

I think having one unified |format filter is beneficial, especially
given that our current escaping rules were kinda complicated and allowed
for seriously dangerous combinations even with autoescape activated.

Now everything passed as an argument to |format is explicitly escaped
unless marked as |safe, there's no way around that anymore.

* Naive first version using |format instead of |f and |fe, might need more review.
* Fix format for unicode strings
* Rename |format to |format_html
* Move nl2br_xhtml to amo.jinja_helpers, use it in all our templates.
* Move datetime filter to our code temporarily, fix mocks, fix recursive error
* Move csrf call to django_jinja csrf_token tag, fix addons templatetags
* Fix |class_selected usage, fix render_with to get registered
* Remove hack from zadmin, fix zadmin templatetags
* Fix user delete photo test, don't rely on proper context updates that happen in order.
* Fix more nl2br tests
* Fix detail page escape, django escapes differently than jinja
* Remove context from edit_review_reply_form
* Fix date created format filter usage
* Remove templates setting user, fix can_review
* Fix collect_add_widget to not inherit the global context
* Remove happy unicode client
* Cleanup can_review, add tests
* Fix tests, django use different html character for double quote escaping
* Switch to firefox latest to check ui-tests
* Cleanup and fix do_truncate
* Remove jingo, copy jingo-minify helpers that depend on jingo to our lib for now
* Rename nl2br_xhtml -> nl2br
* Jinja 2.9 compat for reviews truncate filter
* Don't use TEMPLATE_DEBUG
* Set default value for q, happens on index page.
* Fix jinja2 formatting with newstyle gettext
2017-06-30 17:57:31 -07:00
Christopher Grebs 8207e520c4 Fix tests in travis 2017-05-23 13:38:27 +07:00
Christopher Grebs aba4b7c860 Make sure dbr and dbl have plural forms defined, add test. 2017-05-23 13:22:44 +07:00
Christopher Grebs bef6e8aeae Integrate potools, add rtl support to debug (#5455)
* Integrate dbr and dbl generated with potools.

Fixes #2817

* Fix zadmin.forms, update tests to include debug languages.

* re-add extract

* Run potools via 'npm run' to avoid PATH issues

* Fix get_locale_from_lang and actually test support for debug-languages

* Fix flake8

* Update potools to 0.0.5

* Regenerate dbl and dbr locales.
2017-05-22 21:06:10 +07:00
Mathieu Pillard 2c487211d2 Remove support for MOBILE application (old Fennec) 2017-05-09 15:10:03 +02:00
Andrew Williamson 37e1df2f06 Change task user used in tests so it's not the admin user 2017-01-25 10:16:07 +00:00
Mark Striemer a207265995 Remove set_password/check_password (supports #3049) (#3662) 2016-10-13 12:37:43 -05:00
Mark Striemer 2a40fd88eb Use a test backend for client login (supports #3049) (#3656) 2016-10-12 10:52:00 -05:00
Mathieu Pillard 3763314434 Pretend our product details are always up to date in tests (#3268) 2016-08-12 15:22:05 -07:00
Mathieu Pillard 590150c7c1 Merge pull request #2902 from diox/reduce-log-verbosity-in-tests
Don't log so much stuff in the tests
2016-06-15 16:22:16 +01:00
Mathieu Pillard aad62596b6 Don't log so much stuff in the tests 2016-06-15 15:15:25 +01:00
Christopher Grebs c36308dc99 I found some unused settings in settings_test. Let's remove them. 2016-06-15 16:06:55 +02:00
Christopher Grebs 74f14b492a Remove VALIDATE_ADDONS setting.
There's no need for it anymore.
2016-03-14 17:20:16 +01:00
Christopher Grebs 5b7ae06efd Update django-piston-oauth2, fix merges, more path/import fixes.
* Make migrations work again
* Fix paths in Makefile, make sure olympia get's installed as a module too
* Fix migrations path in 'initialize_db'
* Make sure settings won't be loaded on top in olympia.startup
2016-01-06 10:48:04 +01:00
Christopher Grebs 580ccf7710 Update gitignore, updates to mock/patch import paths, minor fixes along the way. 2016-01-06 10:48:04 +01:00
Christopher Grebs c6d1cc2d66 Update django-waffle, django-piston, more import path fixes.
* Pull in django-waffle 0.10 and a fixed version of django-piston.
  Both provide late-initialization support by not calling get_user_model
  on import-time.
* Add alias for addons.buttons.js
2016-01-06 10:48:03 +01:00
Andy McKay 97f6d58ac2 Revert "update django-product-details and set to https (bug 1113852)"
This reverts commit bad516af81.
2015-12-21 13:22:01 -08:00
Andy McKay bad516af81 update django-product-details and set to https (bug 1113852) 2015-12-04 14:28:53 -08:00
Kumar McMillan fa65808a2d Revert "Use the Travis cache to dramatically speed up test dependency installation."
This reverts commit 81d6f202ee.

django-cache-machine==0.8 does not match what we were using in the git
revision beforehand. This is blocking us on master so I'm just going to revert
temporarily while we fix up pyrepo to get the right packages on there.
2015-10-19 16:32:27 -05:00
Kris Maglione 81d6f202ee Use the Travis cache to dramatically speed up test dependency installation. 2015-10-19 10:36:28 -07:00
Mathieu Agopian 0432e85450 Add the approve_addons management command (bug 1199234) 2015-09-04 10:44:04 +02:00
Kris Maglione 50f1397418 Upgrade Celery and remove some now-unnecessary cruft (fixes bug 1194181). 2015-08-27 15:14:46 -07:00
Kris Maglione edeff385b5 Use separate Elasticsearch instances and memcache pools for each slave when running under xdist. 2015-08-25 12:56:07 -07:00
Kris Maglione b6d2227748 Shuffle some test initialization code to allow running under xdist. 2015-08-25 12:56:07 -07:00
Mathieu Agopian 507ff1c46a Don't configure signing endpoints by default for tests 2015-04-20 20:51:22 +02:00
Mathieu Agopian 82786a084c But still use X-SENDFILE for tests 2015-03-07 19:48:55 +01:00
Mathieu Agopian 2783cceaf3 properly use settings_tests for tests 2014-12-19 18:32:48 +01:00
Mathieu Agopian 8c0e08305c Get rid of test_utils (bug 1090184) 2014-11-18 10:34:35 +01:00
Mathieu Agopian a1e1c8c5fb Remove the need for a settings_local.py (bug 1050155) 2014-09-01 14:51:04 +02:00
Mathieu Agopian a79684ca8c Revert "Remove the default app (bug 1050154)" 2014-08-19 11:28:19 +02:00
Mathieu Agopian 4e0106e319 Remove the need for a settings_local.py (bug 1050155) 2014-08-12 15:25:01 +02:00
Yohan Boniface 986d8670de Removing MIRROR_* settings (bug 1013865) 2014-08-06 18:53:24 +02:00
Yohan Boniface a35ab0834d Migrating to staticfiles (bug 1013865) 2014-08-04 11:12:47 +02:00
Yohan Boniface e6ffc1e3b8 Remove settings.APP_PREVIEW (bug 1019501) 2014-06-03 14:46:36 +02:00
Mathieu Agopian 6c53de093c fix failing tests on jenkins because of persona: don't use persona in tests 2014-04-02 17:28:50 +02:00
Allen Short 5ab4b4a16d Upgrade to Django 1.6. 2014-03-26 16:14:44 -05:00
Mathieu Pillard 01c900892d Merge remote-tracking branch 'zamboni/master'
Conflicts:
	apps/addons/views.py
	apps/amo/log.py
	apps/amo/tests/__init__.py
	apps/devhub/templates/devhub/addons/submit/done.html
	apps/devhub/tests/test_views.py
	apps/devhub/views.py
	apps/editors/helpers.py
	apps/editors/tests/test_helpers.py
	apps/market/tests/test_models.py
	apps/paypal/check.py
	apps/paypal/tests/test_purchase.py
	apps/paypal/tests/test_views.py
	apps/users/models.py
	apps/zadmin/views.py
	lib/pay_server/__init__.py
	lib/pay_server/base.py
	lib/pay_server/test.py
	lib/settings_base.py
	locale/de/LC_MESSAGES/javascript.mo
	locale/nl/LC_MESSAGES/messages.mo
	locale/sr/LC_MESSAGES/messages.mo
	locale/sr/LC_MESSAGES/messages.po
	locale/zh_CN/LC_MESSAGES/messages.mo
	locale/zh_TW/LC_MESSAGES/messages.mo
	media/js/devreg/utils.js
	mkt/account/tests/test_api.py
	mkt/account/views.py
	mkt/api/exceptions.py
	mkt/api/paginator.py
	mkt/api/tests/test_handlers.py
	mkt/api/v1/urls.py
	mkt/asset_bundles.py
	mkt/collections/filters.py
	mkt/collections/serializers.py
	mkt/collections/tests/test_serializers.py
	mkt/collections/views.py
	mkt/comm/__init__.py
	mkt/comm/api.py
	mkt/comm/management/commands/migrate_activity_log.py
	mkt/comm/models.py
	mkt/comm/tasks.py
	mkt/comm/tests/email.txt
	mkt/comm/tests/test_api.py
	mkt/comm/tests/test_commands.py
	mkt/comm/tests/test_models.py
	mkt/comm/tests/test_utils_.py
	mkt/comm/utils.py
	mkt/commonplace/templates/commonplace/index.html
	mkt/constants/comm.py
	mkt/developers/forms.py
	mkt/developers/providers.py
	mkt/developers/templates/developers/apps/edit/admin.html
	mkt/developers/templates/developers/apps/ratings/ratings_edit.html
	mkt/developers/templates/developers/apps/ratings/ratings_summary.html
	mkt/developers/templates/developers/apps/status.html
	mkt/developers/tests/test_forms.py
	mkt/developers/tests/test_views_edit.py
	mkt/developers/tests/test_views_versions.py
	mkt/developers/utils.py
	mkt/developers/views.py
	mkt/features/tests/test_views.py
	mkt/features/views.py
	mkt/fireplace/api.py
	mkt/fireplace/tests/test_api.py
	mkt/fireplace/urls.py
	mkt/lookup/views.py
	mkt/purchase/tests/test_webpay.py
	mkt/regions/middleware.py
	mkt/regions/tests/test_middleware.py
	mkt/regions/utils.py
	mkt/reviewers/templates/reviewers/includes/details.html
	mkt/reviewers/templates/reviewers/includes/mobile_details.html
	mkt/reviewers/templates/reviewers/review.html
	mkt/reviewers/tests/test_views.py
	mkt/reviewers/tests/test_views_themes.py
	mkt/reviewers/utils.py
	mkt/reviewers/views_themes.py
	mkt/search/api.py
	mkt/search/serializers.py
	mkt/search/tests/test_api.py
	mkt/search/views.py
	mkt/settings.py
	mkt/submit/forms.py
	mkt/submit/tests/test_api.py
	mkt/submit/tests/test_views.py
	mkt/submit/views.py
	mkt/webapps/api.py
	mkt/webapps/models.py
	mkt/webapps/tasks.py
	mkt/webapps/tests/test_models.py
	mkt/webapps/tests/test_tasks.py
	requirements/compiled.txt
	requirements/prod.txt
	settings_test.py
	sites/altdev/settings_mkt.py
	sites/dev/settings_mkt.py
	sites/identitystage/settings_mkt.py
	sites/landfill/settings_mkt.py
	sites/prod/settings_mkt.py
	sites/stage/settings_mkt.py
2014-03-11 16:32:38 +01:00
Allen Short 2d5bdc17e7 Revert all Django-1.6 upgrade-related changes.
This reverts commits:
26ae083
e4b8df3
9c89419
9e76f14
4995ffc
f78548f
ec85f89
2014-02-27 08:43:46 -08:00
Allen Short 26ae083cd7 Upgrade to Django 1.6 (bug 850885)
This reverts commit f6b8ebc29a.
2014-02-26 11:07:35 -06:00
Allen Short f6b8ebc29a Temp revert django 1.6 upgrade
This reverts commits:
8ff55ce496
907d466101
2014-02-26 02:31:10 -06:00
Allen Short 8ff55ce496 Upgrade zamboni to use Django 1.6. 2014-02-26 01:59:14 -06:00
Kumar McMillan 7fc4afe50f Pre-generate APKs on app changes (bug 958745) 2014-02-21 15:10:11 -06:00
Andy McKay af8924c105 add in propagation of exceptions (bug 974164) 2014-02-19 11:29:18 -08:00
Mathieu Pillard a2512f1036 Remove mkt/ stuff from Olympia, second pass (bug 973150)
This (almost) completely removes mkt/.
2014-02-19 16:29:18 +01:00