Π“Ρ€Π°Ρ„ ΠΊΠΎΠΌΠΌΠΈΡ‚ΠΎΠ²

48 ΠšΠΎΠΌΠΌΠΈΡ‚ΠΎΠ²

Автор SHA1 Π‘ΠΎΠΎΠ±Ρ‰Π΅Π½ΠΈΠ΅ Π”Π°Ρ‚Π°
Benjamin Forehand Jr 8a646cadc4 Addon Install Test (#6641)
* Use docker-compose>=1.18 and minimal docker-compose config version to 2.3
* Starts ui-tests in Firefox docker container
* Let's the Firefox docker-container hit directly nginx
* makes use of https://github.com/jrbenny35/selenium-firefox/ firefox+selenium image
* makes use of /user-media/ serving directly via nginx for XPI installs
* Adds a helper that creates an installable add-on
* Update `firefox_options` fixture with all options needed to install add-ons with a test signing signature

Fixes #7270 
Fixes #2488
2018-01-12 06:58:00 +01:00
Christopher Grebs 57915e2480
Add isort to our codebase. (#7118)
* Add isort to our codebase.

This is the first draft, please feel free to discuss this but I'm
generally open to change that style later on.

I just want to start making more and more of our code-style a rule
instead of something we have to take care of during code reviews.

* Ignore safe_xml file

* Don't change safe_lxml_etree

* Fix import unifification going bonkers, I don't blame isort though, this was creepy.

* Fix signin.test_views

* More flake8

* Use style number 4, hanging grid

* django group only contains django now, move above 3rd party group

* Remove pytest-isort for now to avoid isort being imported during tests.

isort has a super bad module that sets the defaultsystemencoding to
utf-8 and breaks our tests that ensure that our settings are *never*
unicode strings. If the default system encoding is set to utf-8 these
tests just work since the bytestring will be implicitly encoded to utf-8
instead of ascii which is the python2 default.

https://github.com/timothycrosley/isort/blob/develop/isort/pie_slice.py#L145
2018-01-08 12:05:14 +01:00
Christopher Grebs 778a94871a
Refactor our tests and code to make better use of settings.TMP_PATH
* Also let the dot in py.test die so that upstream is happy again :)
 * Update tox to 2.9.1
 * Make sure that our urlconf is reset *after* we set MEDIA_ROOT
 * Adapt file extraction handling to new TMP_PATH prefixes
 * Less dump_apps hacks since the apps.json file isn't present at the
   beginning of any test now thanks to temporary paths for every separate
   test
 * Rewrite read-only-mode tests to cope with pytest settings fixture
 * Remove atexit hack from settings_test

This will probably make things a lot easier for ui-tests as well.

Fixes #7205
Fixes #7206
2018-01-05 16:41:35 +01:00
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
Mathieu Pillard d2411fd0b6 Rename editors to reviewers everywhere except in the URLs
URLs to follow in a later commit, it will need redirects etc.
2017-10-23 15:55:32 +02:00
Christopher Grebs 57410ab97e Pin all our dependencies, including pip, six, ipython and ipdb. (#6663)
* Pin all our dependencies, including pip, six, ipython and ipdb.

This removes all dynamically installed python packages from the
installation pipeline and should result in a cleaner system install.

Fixes #6001

* Cleanup docs, prod and merge a few dependencies with system.

* Move more dependencies from prod to system :-/

* Finally fix docs task
2017-10-13 06:29:40 +02:00
Benjamin Forehand Jr d6bb402a44 Updated UI-tests to run inside of docker and switched to circleci 2.0 (#6457)
* Updated config to use circleci as well as configure ui-tests to run within docker

* Removed hacky certifi installs

* Update requirements to master versions

Fixes #4697 (though not only that)
2017-10-05 13:14:08 +02:00
Christopher Grebs 42f06f2a73
Merge branch 'master' of github.com:mozilla/addons-server into try-elasticsearch-latest 2017-07-24 12:30:52 +02:00
Mathieu Pillard 218c0c75df Fix some django deprecation warnings (#5811)
* Replace SortedDict with OrderedDict

* Replace get_field_by_name() by get_field()

* Consider warnings as errors to catch DeprecationWarnings

* Upgrade pytest django, since it generates a lot of deprecation warnings

* Ignore DeprecationWarning from django-csp

* Replace old option parsing syntax in management commands

* Replace request.REQUEST with request.POST

* Replace custom sql to create indexes by model options

* Replace get_all_field_names() with get_fields()

* don't keep this

* Try removing the create-db, we're having errors at teardown

* Fix commands args parsing

* Re-consider DeprecationWarnings as errors

* Remove usage of Context()

* Fix DeprecationWarning caused by paypal PaypalError self.message

* Fix linter test using exception.message

* Fix mock to prevent passing a callable to a queryset filter

* Remove reference to non-existent fixture

* django.forms.util module has been renamed. Use django.forms.utils instead

* (WIP) Support zh-hant & zh-hans instead of zh-TW and zh-CN, respectively.

* Don't pass callable to queryset

* ignore jwt deprecation warnings

* Don't use TestCase.urls anymore

* test against exception message directly

* Simplify nested context managers

* Restore this usage of Context(), it's still valid

* Restore setup.cfg

* Revert "(WIP) Support zh-hant & zh-hans instead of zh-TW and zh-CN, respectively."

This reverts commit 7d82b59850.

* fix flake8
2017-07-03 19:45:24 +02:00
Christopher Grebs ceba72be46 Remove translate toolkit, improve denis-cmd linting, compile locales before tests are run (#5655)
* Compile locales before we run tests, add gettext dependency

* Make compile-mo fail on linting errors.

* Fix tox compilation

* More tox fixes

* Fix path

* remove usedevelop for now

* re-add plural forms
2017-06-20 19:43:11 +08:00
Andrew Williamson a5dfd159f0 specify Makefile to use because Travis doesn't run in a container (#5661) 2017-06-16 16:46:00 +01:00
Christopher Grebs c35648da19 Potentially fix our reindex issue on -dev.
It took me days to find this and loads of useless refactoring but
apparently these tasks get immediately upgraded to a chord after we
chain them later with the other tasks (after the for-loop).

And, the only requirement for a chord is: do not ignore the results,
never!

Refs #3960

* Make sure index_stats isn't using call_command
* modernize create_subtasks, add support for countdowns, fix queries loading the world...
* half chunk size for stats reindexing
* Refactor stats reindex logging
* Upgrade elasticsearch to 5.4.1 for our docker config
* Make es test setup easier to inherit for our uitests.
* Restore order, make sure to start es before add-on get's created.
* Remove db requirement from es_test fixture
2017-06-16 12:06:12 +08:00
Christopher Grebs e3e020d3a1 Install six before we upgrade setuptools. (#5541)
* Install six before we upgrade setuptools.

See pypa/setuptools#964 for a few more details. Currently quite a few
travis and circleci jobs are failing because of that.

* Explicitly upgrade pip and setuptools in 'make update_deps' so for travis too.

* Potentially fix circleci

* Fix setuptools and potentially docs environments

* More explicitly install six and setuptools

* Add more requirements for docs

* Add pyparsing dependency
2017-06-01 19:20:12 +08:00
jrbenny35 d97dfe7ad4 Added 5 new tests. Updated tests to use PyPOM.
Added 5 tests from the test_homepage.py file on addons-test.

Also updated tests to use PyPOM as well as a proper Page, Object
model.
2017-04-27 11:45:13 -07:00
Benjamin Forehand Jr c1f2db3c19 Added complete configuration to enable UI testing. 2017-03-24 08:38:50 -07:00
Andrew Williamson 39cda74573 Remove coverage (#4178) 2017-01-03 12:49:24 +00:00
Christopher Grebs 75adf017e0 Move versions to 'main' tox job. 2016-10-13 15:15:22 +02:00
Christopher Grebs aaf5e0d42f Make sure we're testing the versions app in tox again. 2016-10-13 15:07:53 +02:00
Mathieu Pillard 39dda3093a Force tox to always recreate flake8 env to make sure changes to flake8.txt are used 2016-09-22 14:37:52 +02:00
Dave Hunt e8f66d6f5a
Update UI test dependencies to latest stable versions 2016-09-13 11:17:28 +01:00
Christopher Grebs a56ca77199 Various performance improvements for travis tests. (#3044)
* Avoid calling 'npm install' twice (make update_deps and separately)
 * Split users, amo, versions into separate tasks
 * cache .tox folder to speedup dependency installation
 * only clone 3 levels deep
2016-07-06 17:46:50 +02:00
Dave Hunt 6730f9a9f8 Run UI integration tests in Circle CI 2016-06-28 11:55:22 +01:00
Dave Hunt fefca816a0 Initial UI integration tests 2016-06-27 12:12:19 +01:00
Christopher Grebs a8883dc10a Update requirements/docs.txt, install it explicitly to be self-containing. (#2891) 2016-06-14 17:20:55 +02:00
Christopher Grebs 46859e279d Integrate coverage and codecov reports. 2016-05-18 11:18:10 +02:00
Christopher Grebs 50cda44fac Merge pull request #2652 from mozilla/feature/2228-mock-product-details-for-assets-build
Configure settings_test to make sure we're always using the mocked product-details.
2016-05-12 18:48:12 +02:00
Christopher Grebs d7be555cbb Refactor the way we handle dependencies, use 'make update_deps' in tox and docker.
There's now only one place that defines how we install things, the Makefile.

This also merges flake8.txt, test.txt into dev.txt and removed the
unused load.txt and cleans up all installation related code in
Dockerfile and tox.

* Install our node dependencies in update_deps too, we do use at least addons-linter in the near future.
2016-05-12 18:31:40 +02:00
Christopher Grebs a17a0e5dc7 Configure settings_test to make sure we're always using the mocked product-details.
Refs #2228
2016-05-12 17:40:41 +02:00
wezhou 6a41871046 Remove reference to compiled_without_hash.txt in tox.ini 2016-04-13 12:17:57 -07:00
wezhou 4acb69506c Fix travis-ci build failure
* Need to move addons-server install from "deps" to "commands" because
  editable mode is not compitable with hash-checking mode for "pip install"
* Need to add extra install commands for anything used to depend on
  "compiled.txt" or "prod.txt" because the two have been splitted into
  with and without hash files.
2016-04-11 17:59:28 -07:00
Andrew Williamson 15b80c5f12 split addons/editors/devhub build jobs 2016-03-31 16:35:54 +01:00
Christopher Grebs 984a704598 Run addons-linter for WebExtensions.
* Adds simple wrapper around addons-linter
* runs addons-linter if switch 'addons-linter' is active
* only runs it for WebExtensions
* Adds basic compatibility wrapper to integrate it's output
  into the rest of AMO without rewriting everything

fixes #882, fixes #1854, fixes #1853, fixes #1855, fixes #884
2016-03-17 15:56:49 +01:00
Christopher Grebs 400d52eb86 Merge branch 'master' of github.com:mozilla/olympia into feature/restructure-modules 2016-01-22 06:49:19 +01:00
Kumar McMillan 7ca31208cb Use /olympia for all deps, like prod 2016-01-19 11:14:01 -06:00
Kumar McMillan 33cc057a0f Hey Travis, get non-wheels from /olympia like prod 2016-01-19 10:47:08 -06:00
Mathieu Pillard 45a1fa120e Change remaining apps/ paths in the code to src/olympia
That will hopefully fix the travis builds, at least making them run
properly.
2016-01-06 10:48:04 +01:00
Christopher Grebs 2075a68c38 Tell tox to setup the 'olympia' module. 2016-01-06 10:48:03 +01:00
Andy McKay 9993acfbe3 move to new repo 2015-11-25 13:09:24 -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
Kris Maglione da07e6bf8e Run three concurrent test processes for the main and addons-devhub-editors test groups. 2015-10-17 18:14:30 -07:00
Mathieu Agopian de90dc575b Make sure we only install packages from pyrepo 2015-07-28 09:51:54 +02:00
Mathieu Agopian ca7441e30e Switch travis to python2.7 now that production has switched 2015-03-12 18:49:34 +01:00
Mathieu Agopian ab868ab960 pin dev requirements 2015-02-10 10:29:28 +01:00
Mathieu Agopian 769767d806 Use Travis-ci's container infrastructure (bug 1118887) 2015-01-09 10:20:48 +01:00
Mathieu Agopian 2783cceaf3 properly use settings_tests for tests 2014-12-19 18:32:48 +01:00
Mathieu Agopian b3b27d1c6a add the 'assets' build to travis 2014-12-18 12:21:25 +01:00
Mathieu Agopian 7c9c856873 Use pytest (bug 1090184) 2014-12-09 09:45:40 +01:00