12 Commits

Author SHA1 Message Date
Brandon Philips
da3fe920cb fix(tests/v1_migration): add a -name flag
The info flag is ignored as of 1c91c167fc98608ef850a7539550bfc15dedbb46
so in order for this test to work we need to add `-name` flag.
2014-02-06 21:23:00 -08:00
Brandon Philips
d7d20d1c3d bump(github.com/stretchr/testify): 9cc77fa25329013ce07362c7742952ff887361f2 2014-02-02 16:57:36 -08:00
Chris Shoemaker
d89fa131ab feat(v2/errors): Use more appropriate HTTP status codes for error cases.
This commits adds test coverage for all the error and non-error cases
described below, but only the behavior of the 403, 404 and 412 cases
are changing in this commit.

When setting a key results in a new resource, we asset an HTTP status
code of 201 (aka "Created").

When attempting to get a resource that doesn't exist, we assert an
HTTP status code of 404 (aka "Not Found").

When attempting to delete a directory without dir=true, or a non-empty
directory without recursive=true, but the request is otherwise valid,
we assert an HTTP status code of 403 (aka "Forbidden").

When a precondition (e.g. specified by prevIndex, or prevValue) is not
met, but the request is otherwise syntactically valid, we assert an
HTTP status code of 412 (aka "Precondition Failed").  However,
prevExist is handled slightly differently.  If prevExist=false fails,
then this is treated like a failed precondition, so it should use
PreconditionFailed.  But, if prevExist=true fails, then this is
treated like other requests that require the existence of the
resource, and uses NotFound if the resource doesn't exist.

We continue to assert an HTTP status code of 400 when the request is
syntactically invalid (e.g. when prevIndex=bad_index).
2013-12-21 21:39:19 -05:00
Xiang Li
e00296960c test fix tests 2013-12-05 18:16:01 -05:00
Xiang Li
fc562bd625 fix tests bump deps 2013-12-01 17:24:30 -05:00
Ben Johnson
cba2611c68 Renamed configuration parameters. 2013-11-15 00:13:32 -05:00
Ben Johnson
954217fb73 Fix v1 cluster migration test. 2013-11-12 19:27:29 -05:00
Ben Johnson
8c6606ed12 Fix TTL migration issue. 2013-11-05 15:57:53 -07:00
Ben Johnson
d3bfc49b7c Remove leading slash from handlers. 2013-11-04 14:36:20 -07:00
Ben Johnson
6b5d6ecd8b Cluster migration test. 2013-11-04 13:46:43 -07:00
Ben Johnson
bf76af8fd1 Update migration. 2013-11-04 13:16:45 -07:00
Ben Johnson
02abbb6a6c Migration test. 2013-11-03 15:49:00 -07:00