James Phillips
33a7b8e401
Tweaks some tests that were having a hard time in Travis CI and
...
bumps up the default retry time.
2017-05-09 06:48:26 -07:00
Frank Schroeder
de66412bdd
test: simplify joining clusters
2017-05-05 17:07:04 +02:00
Frank Schroeder
7732347172
test: simplify tests that check for peers
2017-05-05 17:07:04 +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
fb83790cb9
Do not modify config after creation II
...
Move code for finding the advertise address via a
template into consulConfig() so that the config
object is not modified after creation.
2017-05-04 01:41:47 +02:00
Frank Schroeder
5f34d766b8
golint: Use fmt.Errorf(...)
...
Replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...)
gofmt -w -r 'errors.New(fmt.Sprintf(a, b)) -> fmt.Errorf(a, b)' *.go
2017-04-25 09:26:13 -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
James Phillips
85c03852a4
Makes the start/stop test less flaky.
2017-03-23 20:04:23 -07:00
Seth Vargo
0170a28ec9
Use new APIs
2017-03-23 18:48:13 -04:00
Kyle Havlovitz
390f41d8d5
Add advanced autopilot features
2017-03-22 15:25:16 -07:00
James Phillips
e91377fa26
Cleans up based on review feedback.
2017-03-20 16:23:40 -07:00
James Phillips
b58faffeac
Fixes a unit test that needed to account for WAN flooding.
2017-03-16 16:42:19 -07:00
James Phillips
7360e0bddd
Adds LAN -> WAN join flooding.
2017-03-16 16:42:19 -07:00
James Phillips
1091c7314e
Removes remoteConsuls in favor of the new router.
...
This has the next wave of RTT integration with the router and also
factors some common RTT-related helpers out to lib. While we were
in here we also got rid of the coordinate disable config so we don't
need to deal with the complexity in the router (there was never a
user-visible way to disable coordinates).
2017-03-16 16:42:19 -07:00
Kyle Havlovitz
81c7a0299e
Add state store table and endpoints for autopilot
2017-02-23 20:32:13 -08:00
Kyle Havlovitz
b20fd222f6
Add raft version 2/3 compatibility
2017-02-22 12:53:32 -08:00
James Phillips
1488af4277
Merge pull request #2319 from hashicorp/f-bootstrap-abort
...
Adds check that aborts bootstrap mode if there's an existing cluster.
2016-09-01 09:49:03 -07:00
James Phillips
40e1553cfc
Fixes error message in test.
2016-09-01 09:48:08 -07:00
James Phillips
4d05d692fc
Makes port selection atomic in unit tests.
2016-09-01 01:01:28 -07:00
James Phillips
c8b184cfd2
Adds check that aborts bootstrap mode if there's an existing cluster.
2016-08-31 21:25:56 -07:00
James Phillips
b32578ccab
Integrates Consul with new version of Raft library.
2016-08-08 19:19:17 -07:00
James Phillips
89c7203f31
Adds coordinate sorting support to catalog queries for nodes and service nodes.
2015-10-23 15:23:01 -07:00
James Phillips
b9d5fb0f90
Flips the sense of the coordinate enable option.
2015-10-23 15:23:01 -07:00
James Phillips
86b112fe31
Does a clean up pass on the Consul side.
2015-10-23 15:23:01 -07:00
Derek Chiang
69003310ca
Fix tests
2015-10-23 15:23:01 -07:00
Mac Browning
6b59226f0a
consul: refactor GetPrivateIP for testability
2015-08-15 17:44:32 -04:00
Armon Dadgar
b4531164e9
consul: updating for Raft API changes
2015-05-08 11:35:52 -07:00
pepov
8cfe42f5dc
add test using separate advertise addresses for wan and for lan
2015-03-28 16:08:19 +01:00
Armon Dadgar
8dc077edaa
consul: Testing leave as leader and non-leader
2015-01-20 16:30:56 -08:00
Chavez
42a92693a8
consul: Server leave test fix
2014-12-05 11:22:54 -08:00
Chavez
b98374802d
consul: Fix failing globalRPC test
2014-12-05 10:36:37 -08:00
Ryan Uber
4203e7ab6d
consul: clean up comments, fix globalRPC tests
2014-11-19 16:37:40 -08:00
Ryan Uber
0cafb129ee
consul: more tests, remove unused KeyManager() method
2014-11-19 16:37:40 -08:00
Ryan Uber
bc2b2120fa
agent: -encrypt appends to keyring if one exists
2014-11-19 16:36:01 -08:00
Armon Dadgar
fe86c8c5ee
consul: Testing ACL resolution
2014-08-18 15:46:22 -07:00
Armon Dadgar
924e4bc7f1
Rename Expect to BootstrapExpect. Fixes #223 .
2014-06-19 17:08:55 -07:00
Armon Dadgar
92b6e947dd
consul: Minor cleanups
2014-06-18 16:15:28 -07:00
Robert Xu
7b456a6d6d
Minor cleanup to logic and testsuite.
...
Signed-off-by: Robert Xu <robxu9@gmail.com>
2014-06-18 18:47:05 -04:00
Robert Xu
c60fd0542a
Add expect bootstrap '-expect=n' mode.
...
This allows for us to automatically bootstrap a cluster of nodes after
'n' number of server nodes join. All servers must have the same 'n' set, or
they will fail to join the cluster; all servers will not join the peer set
until they hit 'n' server nodes.
If the raft commit index is not empty, '-expect=n' does nothing because it
thinks you've already bootstrapped.
Signed-off-by: Robert Xu <robxu9@gmail.com>
2014-06-16 17:40:33 -04:00
William Tisäter
9e3ad6721c
Re-configure `LeaderLeaseTimeout` to pass validation
2014-05-30 20:57:39 +02:00
William Tisäter
ed4230f1fc
Fix tests on Go 1.3 and greater
...
Go 1.3 and greater require ServerName or InsecureSkipVerify to be set.
https://codereview.appspot.com/67010043/
2014-05-27 00:47:47 +02:00
William Tisäter
4685e1c51f
Revert "Remove `WaitForResult` from two failing tests"
...
This reverts commit f0842409cd
.
2014-05-26 23:49:23 +02:00
William Tisäter
f0842409cd
Remove `WaitForResult` from two failing tests
2014-05-26 23:44:37 +02:00
Armon Dadgar
14be60aaca
gofmt
2014-05-20 16:25:29 -07:00
Armon Dadgar
baa831d847
Merge pull request #136 from hashicorp/f-testutil-package
...
WIP: Proof of concept using `WaitForResult` in tests
2014-05-16 15:03:50 -07:00
Armon Dadgar
1611d986d6
consul: Avoid name conflict on WAN ring. Fixes #158 .
2014-05-16 14:07:53 -07:00
William Tisäter
335cd5a68a
Wait wrap tests in `TestServer_JoinLAN`
2014-05-09 03:41:47 +02:00
William Tisäter
4e9e14ff93
Remove all sleeps from `server_test.go`
2014-05-09 01:38:58 +02:00
Armon Dadgar
365fd58e6b
consul: Adding client/server TLS tests
2014-04-07 15:07:00 -07:00