Commit Graph

353 Commits

Author SHA1 Message Date
Ryan Uber 73eae757cf api: remove unneeded static config 2015-02-24 09:50:35 -08:00
Armon Dadgar 6f48e58014 api: Refactoring into shared write logic 2015-02-18 15:15:02 -08:00
Armon Dadgar 69d8b46fa5 api: Refactoring into shared query logic 2015-02-18 15:15:02 -08:00
Ryan Uber c248d5badd api: allow timeout field to be specified for checks 2015-02-05 23:34:30 -08:00
Nicholas Capo 25d2faf43b api/agent: Support HTTP service checks in client api 2015-02-03 20:13:55 +00:00
Armon Dadgar f4543ffc78 CHANGELOG update, gofmt 2015-01-22 13:42:22 -08:00
Armon Dadgar e5e519df4b Merge pull request #625 from hashicorp/f-maintcmd
New "maint" command
2015-01-22 11:56:49 -08:00
Dr. Stefan Schimanski b46d20727b Add test case for service Address field 2015-01-22 11:50:20 +01:00
Dr. Stefan Schimanski 1ef12ae24b Add agent service Address field to the api
The Address field was introduced in #570. This patch extends this to the api.
2015-01-22 10:26:27 +01:00
Ryan Uber d10529c233 api: support reason flag for maintenance mode 2015-01-21 13:02:47 -08:00
Ryan Uber 420d4d0ba4 api: finish up maintenance tests 2015-01-21 11:08:57 -08:00
Ryan Uber 98d47d2b9a api: add node/service maintenance mode functions 2015-01-21 10:51:43 -08:00
Ryan Uber a9069b5993 api: support multiple checks during service/check registration 2015-01-20 21:48:45 -08:00
Armon Dadgar a9819e71a8 Fixing merge conflict 2015-01-20 13:01:13 -08:00
Armon Dadgar de199d1fd6 api: Fixing some comments 2015-01-20 12:58:09 -08:00
Armon Dadgar 707b232274 api: Refactor to share session renew code 2015-01-19 16:53:47 -10:00
Armon Dadgar bed066dda9 api: Detect conflicting existing values for lock/semaphore 2015-01-19 15:32:19 -10:00
Armon Dadgar 1a6b160641 api: Make channels receive only 2015-01-19 14:37:36 -10:00
Ryan Uber 5137388d43 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 90b74ee4e2 fixed: requireOK should close Body on error 2015-01-19 11:53:21 +09:00
Mário Freitas 2db0a65a74 Revert "fixed: body not closed for non HTTP 200 responses"
This reverts commit dafa61ad10d67d1992201f8499ef681e01de8a09.
2015-01-19 11:51:51 +09:00
Ryan Uber 7c6455e1ba api: simple test for unix socket connectivity 2015-01-16 10:56:47 -08:00
Ryan Uber 705801ccca agent: fixing up tests 2015-01-16 09:58:37 -08:00
Mário Freitas 18c4d6ea9e fixed: body not closed for non HTTP 200 responses 2015-01-16 18:54:55 +09:00
Ryan Uber ad19c0afc2 agent: beginning refactor 2015-01-16 00:45:03 -08:00
Jeff Mitchell 9bd66c70e5 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 5cd607b89a 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 400eadd671 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 af186ac54a api: Adding Destroy to cleanup a semaphore 2015-01-13 14:18:28 -08:00
Armon Dadgar a12883a5be api: Adding Destroy to cleanup a lock 2015-01-13 14:01:50 -08:00
Armon Dadgar 18ebb1a8e9 api: Add support for DeleteCAS 2015-01-13 13:57:48 -08:00
Armon Dadgar 6da4761221 Merge pull request #600 from hashicorp/f-api-semaphore
Adding Semaphore support to API
2015-01-13 11:59:22 -08:00
Armon Dadgar 2baa97dde5 api: Changing default semaphore key 2015-01-13 11:51:12 -08:00
Armon Dadgar 229ee483cb api: More reliable session check 2015-01-13 11:50:57 -08:00
Armon Dadgar 02566d0a02 api: Enable debug output from Consul for tests 2015-01-13 11:50:09 -08:00
Ryan Uber 15d7b7e948 api: make node health test more reliable 2015-01-13 11:25:32 -08:00
Armon Dadgar 25bda51af3 api: More semaphore tests 2015-01-12 18:18:32 -08:00
Armon Dadgar 755525e424 api: Adding semaphore tests and fixes 2015-01-12 18:13:52 -08:00
Armon Dadgar 161633eee4 api: First pass at semaphore 2015-01-12 17:43:54 -08:00
Armon Dadgar 654a292c89 api: Minor cleanups in lock 2015-01-12 17:43:13 -08:00
Armon Dadgar 625e45e21e 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 c597f191e3 api: Fixing typo 2015-01-12 15:46:40 -08:00
Armon Dadgar 02c2cc6e08 api: Fixing typos 2015-01-09 17:42:24 -08:00
Armon Dadgar 4e66d5407d api: Adding Lock helpers for leader election 2015-01-09 17:35:17 -08:00
Ryan Uber ab7896256f api: test for a known leader as well as index > 0 2015-01-09 16:39:35 -08:00
Ryan Uber 3ff137ed54 api: improve reliability of catalog endpoint tests 2015-01-07 18:29:42 -08:00
Armon Dadgar 102816ac7f api: Adding constants for session behaviors 2015-01-07 14:01:27 -08:00
Ryan Uber c9b230d25f Import HTTP basic auth patch from armon/consul-api#16 2015-01-07 13:01:44 -08:00
Ryan Uber e108162020 api: improve test reliability 2015-01-06 16:51:28 -08:00
Ryan Uber 9beeb6c81b api: use WaitForResult() to improve health tests 2015-01-06 16:18:50 -08:00
Ryan Uber 77f041b41f api: run consul instance on testing ports 2015-01-06 16:18:29 -08:00
Ryan Uber 1faf1110aa 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 5172b21ee8 api: initial import from armon/consul-api 2015-01-06 10:40:00 -08:00