chore: cleanup the unit tests with ddt

ddt stands for data-driven-tests, and it's also a Python module.
It adds the test data as a decorator to the test methods, so that
the test code can focus on each type of behaviors instead of using
`for` loops internally (on the other hand, you have to split big
tests which testing different types of behaviors into small tests).

Change-Id: I1cba67c15e9bb6e5e73e26a11e08fb1390a0504a
Update Tests for Input Validation

This patch updates the tests, to reflect the API changes in input
validation. This includes adding new data driven tests and removing some
tests that are better addressed unit tests.

Tests: bp input-validation
Tests: bug #1212389

Change-Id: I8e09541b8bfa1e23804e3d13490ff755646f2127
chore: remove unneeded statements in wsgi

1. Falcon response's status defaults to 200, no need to set it;
2. Message posting count checking is already covered by input
   validation.

Change-Id: I905dba8bb55e6a4254b2625bb9b71c51496fd2a8
Merge "Update Tests for Input Validation"
Merge "chore: cleanup the unit tests with ddt"
chore: increase coverage in some trivial ways

1. Remove old functionalities;
2. Remove testings on internal implementations;
3. Add trivial test cases.

Change-Id: I286599ea564e144783e3edbe074d4921fa5b46f6
chore: remove queue_id cruft in mongo driver

We store queue name in message schema; there is no need to query for
queue ID.  Some `queue_id` param are left in comments, this patch
replaces them with `queue_name`.

Change-Id: I260007f0d6091b46755f374d9e237c0a7ab372ef
feat(wsgi): homedoc now ships relative URIs

The document root can be obtained from the service catalog, so
that users can join two URIs to access the doc.

The health endpoint is removed from homedoc at the same time,
since it's an API for diagnose, not for end-users.

Change-Id: I589ff88730302bc553041ecccb9687f7dbcaa9ab
Merge "chore: increase coverage in some trivial ways"
Refactor System Tests

This patch,
1. Renames 'System Tests' to 'Functional Tests'.
2. Reduces LOC by using ddt.
3. Removes test dependencies & the numbering convention used earlier.
4. Re-organizes the test suite structure.

blueprint refactor-system-tests

Change-Id: Ife236abf867b678beb72ea3a26a06d895ed8ad4b
Merge "Refactor System Tests"
chore: Update openstack.common, add lockutils

This patch updates openstack.common to HEAD and also adds
lockutils to openstack-common.conf in anticipation of
pulling in the cache module when it lands.

Change-Id: I714e03c4eba9e98b92144f2b2f227799d104f1bd
Merge "feat(wsgi): homedoc now ships relative URIs"
Merge "chore: Update openstack.common, add lockutils"
fix: claimed message require claim_id to delete

But bulk deletion can still delete both unclaimed and claimed
messages.  However, the major purpose to support bulk deletion
is to make it easy for a user to issue a DELETE on the Location
header returned from a POST; if a user intend to use claim, then
this URI does not help.

Change-Id: Ieed92fc0a07d2e873b729242fb2fb14536462780
Closes-Bug: #1215484
chore: Track the up-and-coming oslo.cache module

While we wait for oslo.cache to land, I'd like to maintain a
verbatim copy under marconi.common so that we can start using
it immediately.

When oslo.cache is approved upstream, this copy of the code
will go away and we will add cache to marconi's
openstack-commong.conf

Change-Id: I608a2891ca06caec47ce18eda4edacd07bec40e9
chore: Update openstack.common to get latest timeutils

This is a simple update to marconi/openstack/common in order
to pick up the optimized version of timeutils.utctime_ts()

Change-Id: Ic37e5f271fe89085317a96c47d18ddd426529b50
fix: Claim can return 404

This patch changes the way creating a claim behaves when the
queue does not exist. Instead of returning 404, it returns
204, meaning the claim was not able to find any messages to
claim.

This was done for two reasons:

1. For eventually-consistent backends, a brand new queue may
not appear to exist, so this new semantic allows the driver
to just try to grab some messages without checking first
whether the queue "exists".
2. For backends like MongoDB that require an extra check to
determine whether a queue exists, this removes an extra
round trip to the DB in order to perform the operation.

Note that the SQLite driver was updated in order to be
consistent with the new behavior.

Change-Id: Icde4ce493a76ef145e99300b67d8344d5092e38d
Partial-Bug: #1218990
Merge "fix: claimed message require claim_id to delete"
Merge "fix: Claim can return 404"