Commit Graph

16 Commits

Author SHA1 Message Date
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 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 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
Frank Schroeder eddb1af603 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
Sean Chittenden 8deec17f73 Use panic instead of returning a sentinel UUID values in unit tests 2016-02-01 16:42:04 -08:00
Sean Chittenden 7af6a94edb Factor out duplicate functions into a lib package
Consolidate code duplication and tests into a single lib package.  Most of these functions were from various **/util.go functions that couldn't be imported due to cyclic imports.  The consul/lib package is intended to be a terminal node in an import DAG and a place to stash various consul-only helper functions.  Pulled in hashicorp/go-uuid instead of consolidating UUID access.
2016-01-29 16:57:45 -08:00
Ryan Uber 544299efa5 agent: pass locally configured token during remote exec 2015-01-29 10:42:46 -08:00
William Tisäter c061eec101 Go format fix 2014-09-19 10:51:03 +02:00
Soren Hansen caedef5cc1 Also change the call sites. *sigh* 2014-09-18 12:55:09 +02:00
Soren Hansen 8605488598 Fix style issue in remote_exec_test 2014-09-18 11:04:20 +02:00
Soren Hansen 8f5089a661 Remove test code duplication 2014-09-17 21:33:03 +02:00
Soren Hansen 264d619457 Pass exitCode by reference
Arguments to defer statements are evaluated when the defer statement is
evaluated, so pass exitCode by reference instead.

Fixes issue #346
2014-09-17 21:17:51 +02:00
Armon Dadgar 9b74b86709 agent: Testing remote exec 2014-09-01 14:46:22 -07:00
Armon Dadgar a0c6dbfe2a agent: testing remote exec writer 2014-09-01 14:46:21 -07:00