Armon Dadgar
d998bb3d67
Fixing merge conflict
2015-01-20 13:01:13 -08:00
Armon Dadgar
2e281dc51f
api: Fixing some comments
2015-01-20 12:58:09 -08:00
Armon Dadgar
7195de51a2
api: Refactor to share session renew code
2015-01-19 16:53:47 -10:00
Armon Dadgar
14691f7e29
api: Detect conflicting existing values for lock/semaphore
2015-01-19 15:32:19 -10:00
Armon Dadgar
4fef14163d
api: Make channels receive only
2015-01-19 14:37:36 -10:00
Ryan Uber
b30af9536d
Merge pull request #608 from imkira/fixBodyLeak
...
fixed: body not closed for non HTTP 200 responses
2015-01-19 09:33:06 -08:00
Mário Freitas
f45105383c
fixed: requireOK should close Body on error
2015-01-19 11:53:21 +09:00
Mário Freitas
f30237a92e
Revert "fixed: body not closed for non HTTP 200 responses"
...
This reverts commit dafa61ad10
.
2015-01-19 11:51:51 +09:00
Ryan Uber
4b635738bf
api: simple test for unix socket connectivity
2015-01-16 10:56:47 -08:00
Ryan Uber
4c3ec248a5
agent: fixing up tests
2015-01-16 09:58:37 -08:00
Mário Freitas
dafa61ad10
fixed: body not closed for non HTTP 200 responses
2015-01-16 18:54:55 +09:00
Ryan Uber
4675cdf01c
agent: beginning refactor
2015-01-16 00:45:03 -08:00
Jeff Mitchell
9fcea08dbb
Ensure a socket is created for permissions adjustment tests and fix some
...
items pointed out in the code review
This code is copyright 2014 Akamai Technologies, Inc. <opensource@akamai.com>
2015-01-15 14:33:44 +00:00
Jeff Mitchell
70dd5a1e81
Unix socket-based HTTP API test functionality. As a consequence this
...
also required making some hardcoded values into more generic
functionality, which is generally a good thing. I verified that each
test function that I modified still passed.:
This code is copyright 2014 Akamai Technologies, Inc. <opensource@akamai.com>
2015-01-14 19:49:37 +00:00
Jeff Mitchell
11a3ce0bdd
RPC and HTTP interfaces fully generically-sockified so Unix is supported.
...
Client works for RPC; will honor CONSUL_RPC_ADDR. HTTP works via consul/api;
honors CONSUL_HTTP_ADDR.
The format of a Unix socket in configuration data is:
"unix://[/path/to/socket];[username or uid];[gid];[mode]"
Obviously, the user must have appropriate permissions to create the socket
file in the given path and assign the requested uid/gid. Also note that Go does
not support gid lookups from group name, so gid must be numeric. See
https://codereview.appspot.com/101310044
When connecting from the client, the format is just the first part of the
above line:
"unix://[/path/to/socket]"
This code is copyright 2014 Akamai Technologies, Inc. <opensource@akamai.com>
2015-01-14 19:31:21 +00:00
Armon Dadgar
7ed1449b6c
api: Adding Destroy to cleanup a semaphore
2015-01-13 14:18:28 -08:00
Armon Dadgar
9608108e64
api: Adding Destroy to cleanup a lock
2015-01-13 14:01:50 -08:00
Armon Dadgar
94d7022a88
api: Add support for DeleteCAS
2015-01-13 13:57:48 -08:00
Armon Dadgar
f2e1594814
Merge pull request #600 from hashicorp/f-api-semaphore
...
Adding Semaphore support to API
2015-01-13 11:59:22 -08:00
Armon Dadgar
ed6abe05fb
api: Changing default semaphore key
2015-01-13 11:51:12 -08:00
Armon Dadgar
4a038927ee
api: More reliable session check
2015-01-13 11:50:57 -08:00
Armon Dadgar
c19b0e2ab2
api: Enable debug output from Consul for tests
2015-01-13 11:50:09 -08:00
Ryan Uber
78328ec149
api: make node health test more reliable
2015-01-13 11:25:32 -08:00
Armon Dadgar
5107f5d1f9
api: More semaphore tests
2015-01-12 18:18:32 -08:00
Armon Dadgar
8ad16ca390
api: Adding semaphore tests and fixes
2015-01-12 18:13:52 -08:00
Armon Dadgar
b39374acae
api: First pass at semaphore
2015-01-12 17:43:54 -08:00
Armon Dadgar
c291acd96e
api: Minor cleanups in lock
2015-01-12 17:43:13 -08:00
Armon Dadgar
3cba4df127
Merge pull request #594 from hashicorp/f-api-lock
...
api: Adding Lock helpers for leader election
2015-01-12 15:47:35 -08:00
Armon Dadgar
7225088c7d
api: Fixing typo
2015-01-12 15:46:40 -08:00
Armon Dadgar
e05ab983ab
api: Fixing typos
2015-01-09 17:42:24 -08:00
Armon Dadgar
854aef82b0
api: Adding Lock helpers for leader election
2015-01-09 17:35:17 -08:00
Ryan Uber
fab30406be
api: test for a known leader as well as index > 0
2015-01-09 16:39:35 -08:00
Ryan Uber
cb1b722813
api: improve reliability of catalog endpoint tests
2015-01-07 18:29:42 -08:00
Armon Dadgar
bb3829c2d9
api: Adding constants for session behaviors
2015-01-07 14:01:27 -08:00
Ryan Uber
60ebd63760
Import HTTP basic auth patch from armon/consul-api#16
2015-01-07 13:01:44 -08:00
Ryan Uber
6c4ff58d2a
api: improve test reliability
2015-01-06 16:51:28 -08:00
Ryan Uber
0c6c06cb0c
api: use WaitForResult() to improve health tests
2015-01-06 16:18:50 -08:00
Ryan Uber
f49189252e
api: run consul instance on testing ports
2015-01-06 16:18:29 -08:00
Ryan Uber
8455077e5d
api: add harnessing for tests
...
This is necessary as consul-api's tests require a real consul instance
to be running. We can't directly import an agent to fire up an instance,
due to the way this would create an import cycle. These tests instead
will start a consul instance using the binary in $PATH (if it exists).
2015-01-06 15:52:06 -08:00
Ryan Uber
5555e0eb9b
api: initial import from armon/consul-api
2015-01-06 10:40:00 -08:00