Commit Graph

56 Commits

Author SHA1 Message Date
a7ec09c877 etcdserver/etcdhttp: use empty node for test 2014-09-15 20:34:14 -07:00
f846c5286a etcdserver/etcdhttp: fix comment, simplify resServer 2014-09-15 19:01:40 -07:00
27cf7747ea etcdserver/etcdhttp: add tests for serveKeys 2014-09-15 18:33:10 -07:00
7ac3b32de6 etcdserver: change raft endpoint to send StatusNoContent 2014-09-15 16:10:31 -07:00
3e2c160eed etcdserver/etcdhttp: add test coverage for serveRaft 2014-09-15 16:07:06 -07:00
e04c028d64 etcdserver/etcdhttp: switch to using http.ServeMux 2014-09-15 16:05:20 -07:00
8a5ab2ec06 etcdserver: introduce Server interface
This changes etcdserver.Server to an interface, with the former Server
(now "EtcdServer") becoming the canonical/production implementation.
This will facilitate better testing of the http server et al with mock
implementations of the interface.
It also more clearly defines the boundary for users of the Server.
2014-09-15 15:11:01 -07:00
d9cfc35bed etcdhttp: check method for every endpoint, add tests 2014-09-15 14:56:43 -07:00
9bf2c2ed9d Merge pull request #1052 from unihorn/121
server: add unit tests
2014-09-15 13:20:50 -07:00
6cd4434ff3 server: add unit tests
Make test coverage >= 90%
2014-09-15 13:16:48 -07:00
e085cc4e06 Merge pull request #1042 from unihorn/118
raft: set none to be 0
2014-09-14 22:32:37 -07:00
54b9c55af3 etcdserver: remove useless sleep
etcdserver.Do will block until there exists leader
2014-09-12 13:01:33 -07:00
0e0fc2bd24 raft: use [1,n] as address list for raft state machines 2014-09-11 19:23:05 -07:00
20776f1947 etcdserver: use int64slice directly 2014-09-11 19:17:07 -07:00
e18b8c12be etcdserver: switch to proper int64Slice for sorting 2014-09-11 17:28:08 -07:00
5f66b35852 etcdserver/etcdhttp: split out peers and add tests 2014-09-11 16:53:55 -07:00
c03798f99b Merge pull request #1011 from jonboulle/clean_http
Validate HTTP API user input
2014-09-11 15:31:25 -07:00
786982d8e5 simplify 2014-09-11 15:13:56 -07:00
52ddd389ff etcdhttp: use Form values over query parameters 2014-09-11 15:12:31 -07:00
7c03704b19 etcdserver: restructure to hopefully simplify
Obviate parseBool helper, define emptyReq locally to parseRequest,
have writeEvent return an error which gets logged
2014-09-11 08:50:41 -07:00
bafe960dba etcdhttp: add Peers.Endpoints 2014-09-10 18:02:02 -07:00
c251304068 *: s/Id/ID/
golang convention dictates that the individual characters in an
abbreviation should all have the same case. Use ID instead of Id.

The protobuf generator still generates code that does not meet
this convention, but that's a fight for another day.
2014-09-10 16:09:08 -07:00
e2d01eff35 etcdserver: switch to using etcd.Error 2014-09-10 15:46:13 -07:00
2342402434 etcdserver: address style comments 2014-09-10 14:14:14 -07:00
bed63cddf7 etcdhttp: add tests for ParseBool/ParseUint64 helpers 2014-09-10 12:05:36 -07:00
e736a11ac4 etcdhttp: perform validation of query parameters
Add basic input validation of all query parameters supported by
serveKeys. Also restructures etcdhttp a bit to better facilitate
testing.

Test coverage is slightly improved.
2014-09-10 12:01:58 -07:00
51e4bbfeb0 http: check err return from http.NewRequest 2014-09-09 20:46:56 -07:00
4e31bb308d raft: use const firstId to track ids 2014-09-09 19:07:20 -07:00
8c58684fb7 etcdserver: fix testServer 2014-09-09 16:59:42 -07:00
01871e7c29 http: use sort.Strings 2014-09-09 16:20:02 -07:00
d519491545 http: add TODO for peers var 2014-09-09 15:55:42 -07:00
961a61d708 http: add allow func
For further extendability
2014-09-09 15:45:34 -07:00
4087fa5c7a http: allow GET, HEAD for /v2/machines 2014-09-09 15:22:52 -07:00
0c1d1b7aeb etcdhttp: add /v2/machines endpoint 2014-09-09 15:00:29 -07:00
44acd57ea4 etcdserver: remove superfluous context 2014-09-09 11:18:25 -07:00
07ce8bc4bc etcdserver: split out functional test to new package 2014-09-09 11:18:24 -07:00
8473f3bf52 api: address review comments 2014-09-09 11:17:53 -07:00
c78239a629 etcdserver: add test coverage for parseRequest 2014-09-09 11:17:53 -07:00
b33b85870d etcdserver: add waitForEvent and encodeResponse coverage 2014-09-09 11:17:53 -07:00
f7444ff300 store: convert Watch to interface 2014-09-09 11:17:53 -07:00
9997c9488a *: fix a few small issues identified by go vet 2014-09-08 23:52:36 -07:00
55b4267c30 Merge pull request #1001 from coreos/sender
etcdhttp: non-blocking sender
2014-09-08 23:36:10 -07:00
908d326e22 etcdhttp: use peer.String() in test 2014-09-08 20:50:35 -07:00
378cadf073 etcdhttp: implment Peers.String() 2014-09-08 20:45:10 -07:00
f4a33dd6df etcdhttp: simple test for peer set cleanup 2014-09-08 17:04:36 -07:00
5c8839387d etcdhttp: set peer should clean up previous values 2014-09-08 16:38:01 -07:00
cbec48e8f6 etcdhttp: non-blocking sender 2014-09-05 13:54:40 -07:00
f1856abe60 etcdhttp: add v2prefix 2014-09-03 21:52:16 -07:00
d844377ca6 *: vendor context 2014-09-03 20:06:16 -07:00
172c1eae5d etcdhttp: fix test build 2014-09-03 20:01:54 -07:00