Commit Graph

24 Commits

Author SHA1 Message Date
Frank Schroeder 0f912c8aad
test: remove ACL options from default test config 2017-05-31 00:29:25 +02:00
Frank Schroeder 141efd9588
test: rename *Config vars to 'cfg'
'c' is ambigous since Command also uses this
and we want to use 'config' as a package name.
2017-05-31 00:29:24 +02:00
Frank Schroeder 0be63d7060
test: refactor httpTest with TestAgent 2017-05-31 00:29:23 +02:00
Frank Schroeder 308f9929b3
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 23a6ff383c
agent: refactor tests for TestAgent
Refactored tests that use

 * makeAgentXXX
 * makeDNSServerXXX
 * makeHTTPServerXXX
2017-05-31 00:29:23 +02:00
Frank Schroeder 82650f73e3
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 66bc2cbabc test: replace blocks and comments with sub-tests 2017-05-10 17:42:38 +02:00
Frank Schroeder d711b9bba0 test: inline request body encoding 2017-05-10 17:42:38 +02:00
Frank Schroeder 1e89692cc1 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 2794db5aac
test: Fix badly formatted retry.Run tests 2017-05-05 17:07:03 +02:00
James Phillips ddfa57765c
retry: Removes the description parameter. 2017-05-05 17:07:03 +02:00
Frank Schroeder 21a82a0a16
test: Refactor WaitForResult tests with retry
Refactor tests that use testutil.WaitForResult to use retry.

Since this requires refactoring the test functions in general this patch
also shows the use of the github.com/pascaldekloe/goe/verify library
which provides a good mechanism for comparing nested data structures.
Instead of just converting the tests from testutil.WaitForResult to
retry the tests that performing a nested comparison of data structures
are converted to the verify library at the same time.
2017-05-05 17:07:02 +02:00
Frank Schroeder 48fa2962eb Revert "test: Run command/agent tests in parallel"
This reverts commit 17be40a733.
2017-04-27 14:39:04 -07:00
Frank Schroeder 17be40a733 test: Run command/agent tests in parallel 2017-04-27 10:34:30 -07:00
Seth Vargo 0170a28ec9
Use new APIs 2017-03-23 18:48:13 -04:00
James Phillips ededf330ba
Adds complete ACL support for listing events. 2016-12-14 19:42:37 -08:00
Ryan Uber beb27fb3ef agent: testing user event endpoint ACLs 2015-06-18 18:13:29 -07:00
Ryan Uber 6f309c355f agent: enforce event policy during event fire 2015-06-18 18:13:29 -07:00
Ryan Uber dbd420fc4b agent: make event buffer test non-sequential 2014-11-20 21:56:50 -08:00
Ryan Uber da96fb5499 agent: Test event order preservation for watches 2014-11-20 20:35:52 -08:00
Armon Dadgar c3bb7de75d agent: Support event filtering on name 2014-08-28 15:25:53 -07:00
Armon Dadgar 602828472d agent: First pass at multi-DC support 2014-08-28 15:00:49 -07:00
Armon Dadgar 337fe4085a agent: Testing event endpoints 2014-08-28 14:38:00 -07:00
Armon Dadgar 77e94cfd38 agent: First pass at event endpoints 2014-08-28 13:42:07 -07:00