Frank Schroeder
a02485462e
test: run agent tests in parallel
...
This brings down the test run from 108 sec to 15 sec.
There is an occasional port conflict because of the nature
the next port is chosen. So far it seems rare enough to live
with it.
2017-05-31 00:29:23 +02:00
Frank Schroeder
b05a875119
agent: refactor tests for TestAgent
...
Refactored tests that use
* makeAgentXXX
* makeDNSServerXXX
* makeHTTPServerXXX
2017-05-31 00:29:23 +02:00
Frank Schroeder
8d9f5b9a64
agent: move http/dns endpoints into agent
...
Move the HTTP and DNS endpoints into the agent and control
their lifespan via the agent.
This removes the requirement to manage HTTP and DNS servers
indpendent of the agent since the agent is mostly useless
without an endpoint and the endpoints without the agent.
2017-05-31 00:29:23 +02:00
Frank Schroeder
efeb7d8535
agent: simplify socket address helper
2017-05-31 00:29:22 +02:00
Frank Schroeder
bc657da280
agent: drop logOutput parameter
...
agent.logOutput is identical to logOutput
2017-05-31 00:29:22 +02:00
Frank Schroeder
3a9f867b9b
agent: drop config argument
...
agent.config and config are identical.
2017-05-31 00:29:22 +02:00
Frank Schroeder
eedf0f3ac5
test: add helper for ioutil.TempDir/TempFile
...
This creates a simplified helper for temporary directories and files.
All path names are prefixed with the name of the current test.
All files and directories are stored either in /tmp/consul-test
or /tmp if the former could not be created.
Using the system temp dir breaks some tests on macOS where the unix
socket path becomes too long.
2017-05-12 22:12:47 +02:00
Frank Schroeder
15590a8446
test: include test name in temp file/dir
...
This helps identifying hanging tests by looking
at the process list.
2017-05-12 22:12:47 +02:00
Frank Schroeder
e13f3446ac
agent: drop atlas/scada code
2017-05-10 23:06:36 +02:00
Frank Schroeder
b6eccb51c7
test: inline request body encoding
2017-05-10 17:42:38 +02:00
Frank Schroeder
4174cc283b
test: add helper for permission denied check
2017-05-10 17:42:38 +02:00
Frank Schroeder
6073c53089
test: drop error check on http.NewRequest
...
Most URLs are static so the error check is redundant.
The subsequent test wouldn't work if the url is wrong.
2017-05-10 17:42:38 +02:00
Frank Schroeder
5bbef3b47e
Revert "test: Run command/agent tests in parallel"
...
This reverts commit 17be40a73310e1a0d2461b175f6214381ac41039.
2017-04-27 14:39:04 -07:00
Frank Schroeder
58e0b5cb70
test: Run command/agent tests in parallel
2017-04-27 10:34:30 -07:00
Frank Schroeder
8c7bb7b65a
golint: Rename fields and structs
2017-04-25 09:26:13 -07:00
Frank Schroeder
f4a56d8a44
golint: Replace a += 1 with a++
2017-04-25 09:26:13 -07:00
Frank Schroeder
9f8f258d4d
Remove duplicate constants
...
This patch removes duplicate internal copies of constants in the structs
package which are also defined in the api package. The api.KVOp type
with all its values for the TXN endpoint and the api.HealthXXX constants
are now used throughout the codebase.
This resulted in some circular dependencies in the testutil package
which have been resolved by copying code and constants and moving the
WaitForLeader function into a separate testrpc package.
2017-04-20 09:54:49 -07:00
Jeff Mitchell
15314c96d0
Update TestHTTPServer_UnixSocket with DialContext
2017-02-10 21:29:42 -05:00
James Phillips
a57ddae900
Adds a leader wait when testing with ACLs.
2016-12-14 16:18:17 -08:00
James Phillips
48603b4764
Adds complete ACL support for agent utility endpoints.
2016-12-14 11:12:55 -08:00
Kyle Havlovitz
ccab51b07c
Add logWriter to agent Create() method
2016-11-28 18:36:26 -05:00
Kyle Havlovitz
d91854f3b0
Add monitor http endpoint
2016-11-28 18:36:26 -05:00
James Phillips
bc333335be
Adds an `X-Consul-Translate-Addresses` to signal translation is enabled.
2016-08-16 11:31:41 -07:00
James Phillips
ffcba3df58
Merge pull request #2028 from hashicorp/f-atomic-kv
...
Adds support for atomic transactions spanning multiple KV entries.
2016-05-15 13:46:05 -07:00
Sean Chittenden
b20f86b4c7
Speling police
2016-05-15 09:13:52 -07:00
James Phillips
54b930103c
Terminates pretty responses with a newline.
2016-05-10 20:02:36 -07:00
Chavez
f75c0f4390
Retry http server connecting in agent/http_test
2016-04-01 19:17:38 -07:00
Ryan Uber
52ad989405
agent: static UI is configurable
2015-12-24 22:21:34 -05:00
Ryan Uber
86f76205aa
agent: initial web assets
2015-12-24 22:21:34 -05:00
James Phillips
2a51d55ce3
Runs go fmt (sorts new go-cleanhttp imports).
2015-10-23 17:14:35 -07:00
James Phillips
fecd639b02
Changes ?near=self to a safer ?near=_agent, which is also clearer about what it does.
2015-10-23 15:23:01 -07:00
James Phillips
1724b9a6be
Adds a magic "self" node name to distance queries.
2015-10-23 15:23:01 -07:00
James Phillips
b63909cf67
Adds coordinate sorting support to catalog queries for nodes and service nodes.
2015-10-23 15:23:01 -07:00
Armon Dadgar
d035dbd43b
Merge pull request #1318 from daveadams/f-http-header-token
...
Allow specifying Consul token in an HTTP request header
2015-10-22 13:33:47 -07:00
Jeff Mitchell
9267f956a2
Update cleanhttp repo location
2015-10-22 14:14:22 -04:00
Jeff Mitchell
06bb9d5f36
Use cleanhttp to get rid of DefaultTransport
2015-10-22 10:47:50 -04:00
David Adams
5f175add40
Add HTTP request header X-Consul-Token
...
Add support for an X-Consul-Token HTTP request header to specify the
token with which this request should be fulfilled. The header would have
precedence over the responding Agent's default token, but would have
lower precedence than a token specified in the query string.
2015-10-19 11:26:01 -05:00
Ryan Uber
495cc41ba4
agent: test scada HTTP server creation
2015-08-25 18:51:04 -07:00
Ryan Uber
1378fd93b0
agent: scada client and HTTP server are tracked separately
2015-08-25 16:59:53 -07:00
Ryan Uber
adbc5c92c6
agent: hide tokens from logs and monitor
2015-04-12 11:17:31 -07:00
Michael Fraenkel
c00c4ebaaa
Support SesionTTLMin configuration
...
- Allow setting SessionTTLMin
- Validate on the Server
2015-03-27 05:13:57 -07:00
Armon Dadgar
0c2951c5f9
agent: Test ACL token resolution
2015-02-18 15:12:15 -08:00
Armon Dadgar
524bfccc5a
agent: Adding atlas_join configuration
2015-02-18 15:12:14 -08:00
Ryan Uber
9fe1b68f26
agent: use squash mapstructure tag to properly decode embedded structs
2015-01-20 21:10:58 -08:00
Ryan Uber
c669a17fa6
agent: use interface for file permissions
2015-01-20 18:53:18 -08:00
Ryan Uber
77c6b86b1e
agent: test Unix domain socket permission settings
2015-01-20 14:32:15 -08:00
Ryan Uber
73a111b35d
agent: adjusting tests for new behavior of sockets
2015-01-20 14:13:36 -08:00
Ryan Uber
263614d596
agent: error if binding to existing socket file
2015-01-16 12:39:15 -08:00
Ryan Uber
328204f535
agent: test socket file overwrite
2015-01-16 10:37:13 -08:00
Ryan Uber
705801ccca
agent: fixing up tests
2015-01-16 09:58:37 -08:00