| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it possible to use Docker and docker-compose for development
as an alternative to Vagrant.
I quite liked vagrant a couple of years ago, but currently:
* Trying to install VirtualBox on Ubuntu wants me to disable
Secure Boot, and I don't want to do that.
* Trying to use the libvirt plugin for vagrant requires I pick
from a very small set of possible images, and requires that I
install the upstream vagrant rather than the vagrant shipped
with Ubuntu 16.04
* I find docker containers faster to work with and more transparent.
So I've done the work to make docker work for Patchwork development.
This doesn't break or in any way interfere with using Vagrant, it just
provides an alternative.
It includes support for headless selenium tests using Chromium.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Stephen Finucane <stephenfinucane@hotmail.com>
|
|
|
|
|
|
|
|
| |
This is preparation for a Docker-based dev environment.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Reviewed-by: Stephen Finucane <stephenfinucane@hotmail.com>
|
|
|
|
|
|
| |
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Reviewed-by: Stephen Finucane <stephenfinucane@hotmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
It tried to use the pbkdf2 hash as the password. Use the username instead, as that
is what create_user sets.
Then it compared the test user username to testuser, rather than the username, which
is dynamically generated. Compare to the generated username.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Reviewed-by: Stephen Finucane <stephenfinucane@hotmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
An OptionalModelChoiceField will attempt to query the database to get choices
in its __init__ method. This fails if the database hasn't been initialised
yet. So, put that in a try/catch block. This lets things work through the
migration and loading of data from fixtures.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Reviewed-by: Stephen Finucane <stephenfinucane@hotmail.com>
|
|
|
|
|
|
|
| |
This improves run time by a few seconds, and is worth having.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Tested-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
| |
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
|
|
| |
Divide the document into a Vagrant-based install section, and a manual
install section (+ footnotes).
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The way that reverse indexing of patches was implemented is broken.
At present, it will retrieve all patches in memory and return the
length from that data, then the slicing operation will then happen
without querying the DB and slice the results cached from the len()
evaluation. This is memory intensive, particularly for larger
instances.
Take advantage of Django's lazy loading to avoid this.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Suggested-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
| |
Simplify object creation through creation of the 'objects.create'
shortcut. In addition, remove an unncessary 'save' call.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
| |
If multiple cover letters are found, parsemail dies with a
MultipleObjectsReturned exception. This is particularly problematic in
the middle of a parsearchive run, so just ignore multiple cover letters.
Signed-off-by: Russell Currey <ruscur@russell.cc>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
|
|
|
| |
Given the documentation suggests using Ubuntu, and any Debian derivative
requires manually specifying plugins in uwsgi, add the python27 plugin to
the example uwsgi settings file.
Signed-off-by: Russell Currey <ruscur@russell.cc>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
|
|
|
| |
systemctl takes the name of the operation before the name of the service
so that you can do multiple things at once, i.e. "systemctl status nginx
postgresql". Fix the ordering of the arguments.
Signed-off-by: Russell Currey <ruscur@russell.cc>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
|
|
|
| |
Creating model objects when not required introduces unnecessary
overhead and delays the tests. Avoid this by only creating new objects
when one isn't provided for us already.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 'default_states' fixture is used in many tests. However, the
'default_states' are merely suggestions for various States, and the
names themselves have no meaning from a patchwork perspective. In
addition, these fixtures significantly increase run time of the tests.
Resolve this by creating new State objects on demand, rather than
using versions provided by the fixture.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
| |
This is no longer needed and can be removed.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
| |
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
| |
This is also useful for the REST API tests.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
| |
* Move some functions and variables from 'tests.utils', where they are
only used in this file
* Rename and regroup some tests to make more sense
* Rename to 'test_parser', as this parses more than patches now
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
| |
* Make use of 'create_' helper functions
* Include every import on its own line
* Use underscore_case, rather than camelCase
* Rename some functions to make more sense
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
| |
* Use underscore_case, rather than camelCase
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
| |
* Don't use hardcode routes: use the reverse function instead
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Don't use hardcode routes: use the reverse function instead
* Make use of 'create_' helper functions
* Minimize duplication of code
* Remove unneeded 'XXX.objects.delete()' calls (all objects are deleted
on teardown of each test)
* Include every import on its own line
* Use underscore_case, rather than camelCase
This includes one trivial, albeit necessary, removal of an import from
'test_user_browser'.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
| |
* Make use of 'create_' helper functions
* Include every import on its own line
* Use underscore_case, rather than camelCase
* Be consistent in how 'Patch.objects.get()' is called
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
| |
* Make use of 'create_' helper functions
* Remove unneeded 'XXX.objects.delete()' calls (all objects are deleted
on teardown of each test)
* Use underscore_case, rather than camelCase
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
| |
Reflect the purpose of these tests - validation of the autocomplete
feature - in the filename.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
| |
* Don't use hardcode routes: use the reverse function instead
* Make use of 'create_' helper functions
* Include every import on its own line
* Use underscore_case, rather than camelCase
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
| |
* Make use of 'create_' helper functions
* Remove unneeded 'XXX.objects.delete()' calls (all objects are deleted
on teardown of each test)
* Include every import on its own line
* Use underscore_case, rather than camelCase
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
| |
* Don't use hardcode routes: use the reverse function instead
* Make use of 'create_' helper functions
* Include every import on its own line
* Use underscore_case, rather than camelCase
* Rename and regroup some tests to make more sense
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
| |
* Make use of 'create_' helper functions
* Include every import on its own line
* Use underscore_case, rather than camelCase
* Don't use class level variables when not required
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
| |
* Make use of 'create_' helper functions
* Include every import on its own line
* Use underscore_case, rather than camelCase
* Don't use list comprehension without generating a list: use a for
loop instead
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
| |
* Don't use hardcode routes: use the reverse function instead
* Make use of 'create_' helper functions
* Use underscore_case, rather than camelCase
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
| |
* Make use of 'create_' helper functions
* Include every import on its own line
* Use underscore_case, rather than camelCase
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Don't use hardcode routes: use the reverse function instead
* Make use of 'create_' helper functions
* Remove unneeded 'XXX.objects.delete()' calls (all objects are deleted
on teardown of each test)
* Include every import on its own line
* Use underscore_case, rather than camelCase
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
| |
* Use underscore_case, rather than camelCase
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
| |
* Make use of 'create_' helper functions
* Remove unneeded 'XXX.objects.delete()' calls (all objects are deleted
on teardown of each test)
* Include every import on its own line
* Use underscore_case, rather than camelCase
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
| |
* Make use of 'create_' helper
* Remove unneeded 'XXX.objects.delete()' calls (all objects are deleted
on teardown of each test)
* Include every import on its own line
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
| |
* Don't use hardcode routes: use the reverse function instead
* Make use of 'create_' helper functions
* Minimize duplication of code
* Use underscore_case, rather than camelCase
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
| |
Add some additional object creation helpers, as a way to help
eventually remove the 'default' class.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
| |
This isn't needed, so remove it.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
| |
The aformentioned function handled both dicts and lists in a request's
context field. Seeing as only dicts are ever returned, this is not
necessary.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
| |
This is useful for highlighting ownership of a check.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
| |
This prevents CIs from overriding the results of another CI by using
the same context.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
| |
Previously this returned a list. However, a QuerySet is more flexible
and is required to provide a generic check endpoint at some point in
the future.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the 'combined_check_status' function returned the checks
enum integer for the status field. However, the string representation
is more meaningful and is the only representation seen by users at
moment. Change this function so it returns, for example, 'success'
instead of '1'.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
| |
The schema for 'Check' defines 'Check.name' as a 'CharField'. This is
less than ideal as names with spaces and special characters can't be
represented cleanly in URLs etc. We should use 'SlugField' instead.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
Closes: #33
|
|
|
|
|
|
|
|
| |
There were issues introduced in the rebase of 'ee15585' that resulted
in two projects being saved with the same ID for one test, leading to
a test failure. Resolve this.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
|
|
|
| |
Building a user-friendly CLI becomes difficult when project-ids are
required. It also makes it almost impossible to work with the current
format of the .pwclientrc file.
Signed-off-by: Andy Doan <andy.doan@linaro.org>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
| |
Signed-off-by: Andy Doan <andy.doan@linaro.org>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
|
| |
Provide a URL to the raw patch.
Signed-off-by: Andy Doan <andy.doan@linaro.org>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
|