Xiang Li
0937b4d266
refactor(event_history.go) remove the extra logic
2013-12-22 15:42:10 -08:00
Xiang Li
ef988020b7
fix(event_history) fix a bug in event queue
2013-12-22 15:42:10 -08:00
Xiang Li
70c8c09360
Merge pull request #412 from mojotech/cas/403-proper-http-statuses
...
Use more appropriate HTTP status codes for error cases.
2013-12-21 20:29:40 -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
Chris Shoemaker
3f85829e87
fix(v2/tests): make comments and tests agree about what's being tested
...
In cases where the comments were incorrect, this changes them to agree
with the tests. In cases where the comments were correct, this extends
the tests to cover the behavior described in the comment.
2013-12-21 21:39:19 -05:00
Chris Shoemaker
3cde996d21
refactor(v2/tests): don't repeat construction of full test URL
2013-12-21 21:39:19 -05:00
Chris Shoemaker
39fb266776
fix(error.go): fix typo in comment
2013-12-21 21:39:19 -05:00
Xiang Li
557ffbb861
Merge pull request #411 from xiangli-cmu/bench
...
Bench
2013-12-21 14:16:08 -08:00
Xiang Li
ddcf3975ed
fix bench
2013-12-21 16:44:28 +08:00
Brandon Philips
cc88215b46
fix(bench): initial commit
2013-12-20 15:19:02 -08:00
Ben Johnson
75c02ed0da
Merge pull request #405 from benbjohnson/tuning
...
Add Tuning section to README.
2013-12-18 15:42:16 -08:00
Ben Johnson
c7536ff5e1
Add Tuning section to README.
2013-12-18 16:40:29 -07:00
Ben Johnson
fd8ce5d11a
Merge pull request #398 from benbjohnson/mod-leader
...
mod/leader
v0.2.0-rc3
2013-12-16 14:55:11 -08:00
Brandon Philips
838645f1b7
Merge pull request #402 from philips/add-header-docs
...
feat(README): document the etcd request headers
2013-12-16 12:44:49 -08:00
Brandon Philips
4fb8e79237
Merge pull request #404 from philips/add-cetcd
...
feat(README): add cetcd
2013-12-16 10:38:01 -08:00
Brandon Philips
c352db9acd
feat(README): add cetcd
2013-12-16 10:37:26 -08:00
Brandon Philips
60813103e3
Merge pull request #401 from philips/add-dir-docs
...
feat(README): add notes about in-order key creation
2013-12-16 10:30:32 -08:00
Brandon Philips
d816db07e3
feat(README): add directory tutorial
2013-12-16 10:30:13 -08:00
Ben Johnson
296eaf7b34
Add leader module to README.
2013-12-16 08:00:16 -07:00
Ben Johnson
2ce587ebc7
Merge branch 'master' of https://github.com/coreos/etcd into mod-leader
2013-12-16 07:47:31 -07:00
Brandon Philips
18bf886368
feat(README): document the etcd request headers
2013-12-15 21:45:10 -08:00
Brandon Philips
1de78fef4d
feat(README): add notes about in-order key creation
2013-12-14 13:08:02 -08:00
Brandon Philips
54794d57fe
Merge pull request #400 from philips/add-lock-docs2
...
fix(README): cleanup lock documentation
2013-12-13 15:07:56 -08:00
Brandon Philips
412f56f971
fix(README): cleanup lock documentation
...
accidently merged this without any review. Here are some more cleanups.
2013-12-13 15:07:39 -08:00
Brandon Philips
e87ee6a86b
Merge pull request #399 from philips/add-lock-docs
...
feat(README): add a modules section to the README
2013-12-13 15:02:37 -08:00
Brandon Philips
418eccb3d7
feat(README): add a modules section to the README
2013-12-13 15:02:25 -08:00
Ben Johnson
61227d7477
mod/leader
2013-12-13 15:25:03 -07:00
Brandon Philips
931ae5fec3
Merge pull request #397 from philips/fixups-for-the-dashboard
...
Two dashboard fixups
2013-12-13 12:47:00 -08:00
Brandon Philips
bcf692d775
chore(mod/dashboard): rebuild to the latest version
2013-12-13 12:44:24 -08:00
Brandon Philips
7e5aa3137d
fix(server/registry): use url.Value.Encode()
...
Instead of open coding url encoding which lead to error, make it real
and use the library.
2013-12-13 12:43:01 -08:00
Brandon Philips
e24d2fdb6c
fix(mod/dashboard): fix after api changes
...
use node instead of kvs and value
2013-12-13 12:36:29 -08:00
Xiang Li
fe80a868a0
Merge pull request #396 from ccding/master
...
gofmt for ./server ./test
2013-12-12 15:00:41 -08:00
Cong Ding
468bfedf34
gofmt
2013-12-12 14:53:22 -08:00
Brandon Philips
5e1fdf554d
Merge pull request #389 from philips/document-ttl-directories
...
feat(README): add directory TTL documentation
2013-12-12 11:38:49 -08:00
Xiang Li
d204fa8438
Merge pull request #394 from xiangli-cmu/fix_error_msg
...
fix(store.go) report node.path
2013-12-12 10:13:01 -08:00
Xiang Li
dba5eb57cf
fix(store.go) report node.path
2013-12-12 10:12:33 -08:00
Xiang Li
0399593589
Merge pull request #393 from xiangli-cmu/fix_index
...
fix(dispatch) should call e.Index()
2013-12-12 09:57:16 -08:00
Xiang Li
36dda352d9
fix(dispatch) should call e.Index()
2013-12-12 09:56:28 -08:00
Ben Johnson
44f050f59a
Merge pull request #384 from benbjohnson/refactor-mod-lock
...
Refactor mod/lock.
2013-12-11 19:34:26 -08:00
Ben Johnson
3caf7745b6
2013-12-11 20:24:43 -07:00
Xiang Li
c1508becd6
Merge pull request #390 from xiangli-cmu/fix_v1_index_inconsistence
...
fix index inconsistence in v1 api
2013-12-11 11:24:53 -08:00
Xiang Li
a5bca025b1
fix index inconsistence in v1 api
2013-12-11 11:12:39 -08:00
Brandon Philips
bb64e7b6e5
feat(README): add directory TTL documentation
2013-12-11 10:47:00 -08:00
Xiang Li
f66bd1689d
Merge pull request #387 from xiangli-cmu/fix_expire_notify
...
Fix expire notify
2013-12-11 10:23:53 -08:00
Xiang Li
3e4f8a382e
fix TestV2WatchKeyInDir test
2013-12-11 10:19:16 -08:00
Xiang Li
44b08fea62
Merge branch 'add-expire-dir-test' of https://github.com/philips/etcd into fix_expire_notify
2013-12-11 09:57:34 -08:00
Brandon Philips
74bd0d95b8
fix(server): try and add a expire dir test
...
This doesn't actually work yet.
2013-12-10 16:32:37 -08:00
Xiang Li
f83e76eb60
Merge https://github.com/coreos/etcd into fix_expire_notify
2013-12-10 15:18:00 -08:00
Xiang Li
06473ba6fe
fix(store.go) expire should also notify all the watchers under the path
2013-12-10 15:17:13 -08:00
Brandon Philips
cb9f677cf6
chore(server): cleanup some whitespace
2013-12-10 11:13:37 -08:00