Add support for POST commit coverage runs

Modeled on how keystone does it.

Change-Id: Idad4f854f1bfb915a48ff69988553810a76accc0
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Verbose functional test request failures.

* test/__init__.py: Put safe_repr import/implementation here so that it
is available to functional and unit tests.

* test/functional/swift_test_client.py: When a request fails
record why that request failed, how many requests failed, and what the
request was when raising RequestError to aid in debugging. Makes use of
safe_repr from test/__init__.py.

* test/unit/common/test_constraints.py: Remove implementation of
safe_repr and use the implementation in test/__init__.py.

Change-Id: I6c957343fb4b8b95d3875fd5ca87b3cf28a5f47a
Fix sync test when localhost on port 80 is binded

- When localhost:80 was binding the tests was trying to connect into it.
- To test you can simply run sudo python -m SimpleHTTPServer 80 which
  should show :

  1.0.0.127.in-addr.arpa - - [06/Aug/2013 14:10:42] code 501, message Unsupported method ('DELETE')
  1.0.0.127.in-addr.arpa - - [06/Aug/2013 14:10:42] "DELETE /a/c/o HTTP/1.1" 501 -

  (the test was passing since 501 would raise ClientException).
  mock delete_object in the fourth test to fix that
- Refactor the code to use mock.patch as well.

Closes-Bug: 1208802
Change-Id: I5ddd4ac3a97879f51cf5883fcfc0fe0f0adaeff6
Tinker with dockstrings in back-ends and related places

Change-Id: If80509e2e19cec5d0b8c5cfccd15e6d893558de4
fix race in test_wait on busy server

fix bug 1224208

Change-Id: I83c673a87c31214a7c54b6399ca53512885e6bc3
Ensure audit tests don't cause unwanted errors

Because the audit code catches all Exceptions, bugs in the code, like
misspelled names, bad logic, can result in errors which don't cause
exceptions that kill the unit tests.

Change-Id: Idb8e3b00a49863ab920161a46edb61a5c47fffe2
Merge "Fix sync test when localhost on port 80 is binded"
Merge "Ensure audit tests don't cause unwanted errors"
Merge "Verbose functional test request failures."
Merge "fix race in test_wait on busy server"
Merge "Tinker with dockstrings in back-ends and related places"
Add handoffs_first and handoff_delete to obj-repl

If handoffs_first is True, then the object replicator will give
partitions that are not supposed to be on the node priority.

If handoff_delete is set to a number (n), then it will delete a handoff
partition if at least n replicas were successfully replicated

Also fixed a couple of things in the object replicator unit tests and
added some more

DocImpact

Change-Id: Icb9968953cf467be2a52046fb16f4b84eb5604e4
Use an existing local var rather than doing alookup

This should make ``Ring.get_more_nodes`` microscopically faster.

Change-Id: Ibf0988fe0630ad94ac0c04040766d89ef86d1488
Switched some relative imports to be absolute

Implicit relative imports don't work on Python3, and are also prone to
several different classes of errors.

Change-Id: I7b62e9bfbe9c0b1fc9876413e3139fda019a4e57
Merge "Add handoffs_first and handoff_delete to obj-repl"
Use a local variable auditor_worker

This patch is only a cleanup, but our code makes me rage every time
I read it. In short, we have a class with a variable self.auditor,
and we assign ObjectAuditor to it at some ties, AuditorWorker at
other times. So, whenever there's a mismerge or whatever, you cannot
tell if self.auditor.broker_class makes sense or not.

Since all cases of using self.auditor as AuditorWorker are purely
local, just evict it to a local variable auditor_worker. Leave
self.auditor to represent ObjectAuditor, because it's used as
a class variable in places.

Change-Id: I811b80ac6c69a4daacfed7a5918bc0b15761d72e
Merge "Switched some relative imports to be absolute"
Merge "Use a local variable auditor_worker"
Merge "Add support for POST commit coverage runs"