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

32 Коммитов

Автор SHA1 Сообщение Дата
Benjamin Forehand Jr c8d2ddbd9d
Revert "Enable circleci integration tests (#9075)" (#9108)
Until we can figure out a solution or a method of testing the login that will work for multiple integration test suits running they should be disabled.
2018-08-08 10:24:23 -04:00
Benjamin Forehand Jr 29a2748b0b Enable circleci integration tests (#9075)
Temp fix to get the integration-tests running. Should fix #9062 as the branch I am using is pretty much what the official release will be.
2018-08-07 21:53:42 +02:00
Mathieu Pillard 94e2889fda Work around 'Multiple .dist-info directories' error when updating deps 2018-07-20 13:37:32 +02:00
pyup.io bot 213e5a5730 Update django-extensions to 2.1.0 (#8892)
* Update django-extensions from 2.0.7 to 2.1.0
* Remove our no-utf8 hack
2018-07-17 09:40:45 +02:00
Benjamin Forehand Jr cafc5d0519
Add UI devhub login and upload tests (#8559)
* Added devhub login and upload tests.
* Add ui-test webext.
* Remove management commands.
2018-07-13 08:55:40 -04:00
Christopher Grebs 7407b70aa2
Update to Django 1.11 (#8738)
Port code and tests to Django 1.11.

* Update requirements to Django 1.11.14, remove session_csrf
* Use --run-syncdb for migration calls
* Remove unused setup-docker script
* Port code and tests to Django 1.11.
* Remove django-session-csrf everywhere, it got replaced by django's own
  session csrf protection
* Make sure we are calling `client.get()` with `follow=True` where necessary
* Replace django.core.urlresolvers import with django.urls
* Port custom `IconWidgetRenderer` to Django 1.11 as `IconTypeSelect`
* Properly use `_queryset_class` for custom manager classes
* Make use of `base_manager_name` on our models `Meta` instead of `use_for_related_objects`
  on the manager where appropriate. This is required to make translations, soft-delete
  and more work. See comment on Addons.Meta for more details.
* Various fixes along the way to make tests work
* Port form errors for locale editing forms to Django 1.11 and make use of
  form.add_error instead of our own custom process
* Mark TestDetailPage.test_304 as xfail for now, somehow Etags seem to be broken
  for that view during tests but work fine in manual tests
* Fix amo.celery, we cannot have any imports at the module-level that may
  import the ORM
* Fix global_settings context processor for 500-server error cases
* Fix `changed_data` handling in `AMOModelForm`
* Remove `queryset_transform` and implement it directly in amo/models
* Fix pagination, Django changed how `num_pages` work and how `count` can be overwritten
* Add a new test that tests database transforms as `BaseQuerysetTestCase`
* Make sure `legacy_redirect` only appends `?` if there are actual GET parameters
* Re-implement `LicenseRadioChoiceInput` as `LicenseRadioSelect` which is now Django 1.11 compatible
* Remove our custom `form_kwargs` uplift from Django 1.9
* Correct how we're using `Category.objects.create` and only pass `db_name` instead of `name`, previously
  this didn't error but now it (luckily!) does
* Update `FileSelectWidget` to correctly work with Django 1.11, use custom rendering
* Fix decorator ordering for `files.views:browse`
* Update database settings to correctly use `TEST` object
* Fix `select_related` call in `RatingViewSet`
* Remove custom `DateTimeCast` implementation
* Fix `addon_factory` calls in `reviewers/tests/test_views.py` to correctly set
  `is_webextension`
* Port our `TranslationDescriptor` and `TranslatedField` to Django 1.11. Also, make sure form error handling works
* Add a new test that checks that `default=None` is a valid setting for translation fields
* Add a new test that checks that translations from related fields are correctly fetched
* Remove possible ambiguity from translations `TestWidget` tests
* Make sure that the correct `MEDIA_URL` is set in `TestDownloadsUnlistedVersions` to fix
  external cdn tests

* Remove custom happyforms code. Django cleans text fields now by default
* Move translations app to the top of INSTALLED_APPS, add a lengthy comment
* Pass additional arguments to contribute_to_class, fix smaller nits
* Set MEDIA_URL and STATIC_URL to an external value by default. That's how they're configured in dev, stage and prod anyway.

Please note that we didn't replace all our custom form rendering with proper templated widgets yet. This will
happening in some follow-up work.

Fixes #5271, Fixes #1569
2018-07-11 06:56:54 +02:00
Christopher Grebs 1bf79b82fa
Fold jingo_minify into our code.
This will simplify the upgrade to Django 1.11 and allow us to keep this
under control, upstream isn't properly maintained.

* Cleanup jingo-minify, keep only parts we are using. Cleanup tests

Also fix and simplify compress_assets to link to the correct /static/ folder.

Originally we hardcoded to look for settings.STATIC_ROOT but that
doesn't suffice since it's set to /site-static/ by default.

We are now using hardcoding the source of our static files instead of
guessing and mistakenly re-using STATIC_ROOT.

This commit also removes verbosity as an argument and simply logs all
errors immediately.

To simplify testing it adds a --force parameter.

To verify this works locally:

* Change settings.STATIC_ROOT to `'/site-static/`'
* Add `/site-static/` to the folders served by nginx (I'll open an issue
on our nginx container to serve this by default too)
* You may have to restart the nginx container after that for nginx to
pick things up
* Remove everything inside site-static folder
* Run `make update_assets`

Fixes #8532
2018-07-09 16:14:42 +02:00
Christopher Grebs 812d885b64
Revert "Fold jingo_minify into our code (#8694)"
This reverts commit 762142ee5a.
2018-07-05 15:19:07 +02:00
Christopher Grebs 762142ee5a
Fold jingo_minify into our code (#8694)
This will simplify the upgrade to Django 1.11 and allow us to keep this
under control, upstream isn't properly maintained.

* Copies jingo-minify into our code
* Removed all parts we aren't using (yui, git integration, `{{ inline_css }}` template tag etc)
* Try to clean up how subprocess calls are being made
* Cleaned up tests

This doesn't change anything regarding how jingo-minify works. It's still using good old `cat` and other ugly things but the code now looks nicer.

See 742297fef9 for more specific details about the cleanup from the original jingo-minify dump.

Fixes #8532
2018-07-02 11:14:53 +02:00
Christopher Grebs ceae9d4fd0
Remove cache machine (#8606)
Fixes #7743
2018-06-28 13:20:06 +02:00
Andrew Williamson fd916c252e
split local dependencies from pure test dependencies and only test deps in travis (#8639) 2018-06-25 11:53:45 +01:00
Christopher Grebs d014a9b1b1
Introduce temporary workaround for circleci failures.
The --no-utf8 option accidentally got reversed in django-extensions
1.8.1. The issue got reported upstream in
https://github.com/django-extensions/django-extensions/issues/1213 and
there's a fix in
https://github.com/django-extensions/django-extensions/pull/1214 which,
once this lands means we can safely remove our "--no-utf8" in the
makefile.

Fixes #8593
2018-06-21 09:32:11 +02:00
Christopher Grebs d6b44de95e
Use manage.py migrate instead of deprecated syncdb.
This is just a small code-cleanup update towards Django 1.11 where
`syncdb` doesn't exist anymore.

Fixes #8530
2018-06-16 22:05:19 -07:00
Christopher Grebs e439450c6e
Port mozilla/amo-loadtest to FXA authentication and WebExtensions. (#8089)
* Port mozilla/amo-loadtest to FXA authentication and WebExtensions.

This is the first part of many to improve our load-tests and allow them
to be run regularly as part of a regression test suite.

This commit primarily ports the existing tests over to our repository,
updates them to use FxA authentication and uses a WebExtension for the
upload test.

This only implements the baseline for more work to come in #7744 but
it's important to have authentication and the basic infrastructure
working correctly.

It's also still using the legacy add-on detail and listing pages,
that'll obviously change - or be only true for SeaMonkey and Thunderbird
related tests since we still have to support them (very low priority though)

It also adds a first step of a summary report that links to new-relic.
That'll need a bit more tooling and testing but it worked quite well in
first tests.

Refs #7744

Next steps:
 * Implement most of the read-only tests from #7744
 * Check what needs auth in #7744, implement it properly
 * Implement database and cache query logging
 * Implement a unified merged test-report that uses the database and
 cache query logging and merges it with locust logs (using our new
 unique request id)

* Fix makefile, show dummy-usage for now.

* Delete generate-summary script for now

* Pin and cleanup dependencies

* Reverse all urls
2018-04-25 11:32:40 +02:00
Benjamin Forehand Jr ab1fe7c170 Add ui login tests (#8076)
* Update tests for fxa login.

* Updates to docker compose file to allow localhost logins.

* Updated files.

* Updated readme and circle file.

* Fix typo.

* Removed debugging steps and updated readme and comments.

* April 26 Homepage update.
2018-04-23 08:02:15 +02:00
Christopher Grebs 49e870a58c
Do not install system dependencies with progress-bar=off.
This fixes our docker builds.
2018-04-16 11:16:16 +02:00
Christopher Grebs b022b77c8a
Make use of newly gained feature to disable pip download progress bars.
This will make logs in our ui-tests and travis much more readable and
might even speed things a few seconds up.
2018-04-16 06:47:25 +02:00
Andreas Wagner 3d4053dfd2
Move comment to the correct line (#7634) 2018-02-23 13:50:36 +01:00
Andreas Wagner 89ace240f8
Fix circleci by making sure product-details are set before running fake migrations (#7609) 2018-02-20 15:03:31 +01:00
Christopher Grebs d31333c456
Always create switch if not existing 2018-01-26 08:19:33 +01:00
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
Andrew Williamson afa92c9947
Static theme wizard (#6993) 2017-11-24 14:41:59 +00: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
Andrew Williamson d7ee42bfa9 jquery-minicolors from npm (#5714) 2017-06-21 16:06:31 +01:00
Andrew Williamson dcc7054cdf use raven-js from npm; upgrade. (#5706) 2017-06-21 09:55:37 +01:00
Andrew Williamson 10c1ca076c load jqModel from npm (slight upgrade from 1.4.1 to 1.4.2 also) (#5703) 2017-06-21 09:07:44 +01:00
Andrew Williamson d6647f8e2f jquery-pjax to npm (#5666) 2017-06-19 09:10:05 +01: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
Andrew Williamson 135e2fa3d4 upgrade underscore and fetch from npmjs (#5660) 2017-06-16 13:27:44 +01:00
Andrew Williamson 6f7eea91a1 jquery.browser,cookie,timeago from npmjs (#5636) 2017-06-15 12:04:08 +01:00
Andrew Williamson e971a1c054 Make Makefile cleaner by splitting tasks between host and container (#5634) 2017-06-15 09:41:40 +01:00