James Phillips
355de958fe
Takes parallel away from some currently flaky tests.
2017-06-02 18:07:27 -07:00
James Phillips
0cf7928222
Cleans up incorrect router shutdown.
...
Fixes #3102 .
2017-06-02 16:33:48 -07:00
Frank Schroeder
5a17fabc50
test: use random ports for consul tests
2017-05-31 12:15:55 +02:00
Frank Schroeder
b06c969deb
agent: use agent logger for consul client and deps
2017-05-31 11:05:02 +02:00
Frank Schroeder
4e3b58ef4d
test: don't panic if there is no error
2017-05-31 08:59:41 +02:00
Frank Schroeder
46526a8d1d
test: fail if there is no leader
2017-05-31 00:29:29 +02:00
Frank Schroeder
2b627b95dd
agent: fix logging
...
* use agent logger for consul/serf/raft/dns/agent/...
* support optional id for concurrent tests
2017-05-31 00:29:27 +02:00
Frank Schroeder
856d438536
consul: use correct shutdownCh for Router
2017-05-31 00:29:27 +02:00
Frank Schroeder
d84e7f9798
test: run consul tests in parallel
2017-05-31 00:29:26 +02:00
James Phillips
14d5a0dfeb
Removes an obsolete endpoints document.
2017-05-26 10:33:01 -07:00
James Phillips
db5be4b76b
Prevents bad coordinates and cleans them up in the database.
2017-05-25 17:37:16 -07:00
Frank Schroeder
69125e3a58
agent: move isAddrANY to separate package
2017-05-15 22:44:43 +02:00
Frank Schroeder
d6eb1d434f
agent: Replace client/server with delegate interface
...
This patch adds a new internal interface clientServer
which defines the common methods of consul.Client and
consul.Server. This allows to replace the following
code
if a.server != nil {
a.server.do()
} else {
a.client.do()
}
with
a.delegate.do()
In case a specific type is required a type check can
be performed:
if srv, ok := a.delegate.(*consul.Server); ok {
srv.doSrv()
}
2017-05-15 18:35:38 +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
James Phillips
830bc2df3b
Removes a stale comment about the RPC source address.
2017-05-10 20:45:19 -07:00
Kyle Havlovitz
e4af6583f5
Add a path for transitioning to TLS on an existing cluster ( #3001 )
...
Fixes #1705
2017-05-10 14:25:48 -07:00
Frank Schroeder
8821793358
agent: Disallow :: and [::] as service address
2017-05-09 17:56:15 +02:00
Frank Schroeder
5b48fec0dd
agent: Disallow 0.0.0.0 as service address
...
Fixes #2961
2017-05-09 17:56:15 +02:00
James Phillips
bccf493262
Fixes vet errors.
2017-05-09 06:48:52 -07:00
James Phillips
6103198732
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
f439fc111d
test: simplify joining clusters
2017-05-05 17:07:04 +02:00
Frank Schroeder
0a7898f039
test: simplify tests that check for peers
2017-05-05 17:07:04 +02:00
Frank Schroeder
5c6be1cc7a
test: Fix badly formatted retry.Run tests
2017-05-05 17:07:03 +02:00
Frank Schroeder
17f6ecdd12
test: convert remaining WaitForResult tests
2017-05-05 17:07:03 +02:00
James Phillips
7007c89870
retry: Removes the description parameter.
2017-05-05 17:07:03 +02:00
James Phillips
ffdfe2c201
test: Tweaks ACL replication tests to converge faster w/less spam.
2017-05-05 17:07:03 +02:00
Frank Schroeder
9435cadeee
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
b1e97baacb
Fix imports
2017-05-05 17:07:00 +02:00
James Phillips
d567a9b53d
Adds support for new-style peers.json recovery for newer Raft protocol versions.
2017-05-04 14:15:59 -07:00
James Phillips
9c3abd33c3
Adds timeout and waits for feedback when asking the leader loop to reassert.
...
This adds on to the fix in #3004 for issue #2980 .
2017-05-04 11:52:22 -07:00
Frank Schroeder
cff494e47d
Do not block on reassertLeader during shutdown
2017-05-04 16:48:54 +02:00
Frank Schroeder
cea98ae5f4
Straighten control flow in leader.go
2017-05-04 16:17:02 +02:00
James Phillips
f3c1f516b4
Kick the leader loop on the proper thread after a snapshot restore, and
...
only if leadership is already established.
2017-05-04 16:17:01 +02:00
James Phillips
953347a6fe
Runs revoke leadership actions only if we've established leadership.
2017-05-04 16:17:01 +02:00
Frank Schroeder
f894a4cb7d
Use bind address as source for outgoing connections ( #2822 )
...
This patch configures consul to use the bind address as the
source address for outgoing connections.
Fixes #2822
2017-05-04 01:41:47 +02:00
Frank Schroeder
c772cecaab
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
6b96c9ff91
Do not modify config after creation
...
Make sure the RPCAdvertise address is always set
so that the configuration does not have to be modified
after creation.
2017-05-04 01:41:47 +02:00
Frank Schroeder
8aa969c966
Cleanup consul/config
2017-05-04 01:41:47 +02:00
Frank Schroeder
2bf668b658
api: Add ServiceTags to Health state endpoint ( #153 )
...
This patch adds the ServiceTags to the /v1/health/state/<state>
endpoint.
Fixes #153
2017-04-28 15:00:08 -07:00
James Phillips
9ead18dbbb
Gets rid of zero-value initializer.
2017-04-28 08:52:50 -07:00
James Phillips
77b803c12b
Removes panic repro test.
2017-04-27 17:08:06 -07:00
James Phillips
e9606c225a
Embeds the mutex since it covers all fields.
2017-04-27 17:04:49 -07:00
James Phillips
3fa22aa42b
Fixes panic when timer fires as tombstone GC is being stopped.
2017-04-27 16:43:07 -07:00
James Phillips
e3ac9d5c1b
Cleans up some bad unit test failure cases.
2017-04-27 16:41:42 -07:00
James Phillips
8db344248b
Cleans up comments.
2017-04-27 16:41:28 -07:00
Frank Schroeder
9a2063bf6f
test: Speedup session renew tests
2017-04-27 10:34:30 -07:00
Frank Schroeder
8feb9e5423
test: Speedup TestClient_RPC_ConsulServerPing
2017-04-27 10:34:30 -07:00
Kyle Havlovitz
42cf797ad9
Add TLS cipher suite options and CA path support ( #2963 )
...
This patch adds options to configure the available
TLS cipher suites and adds support for a path
for multiple CA certificates.
Fixes #2959
2017-04-27 01:29:39 -07:00
Frank Schroeder
9e2332f6a1
golint: Fix existing comments
...
This needs more work.
2017-04-25 09:26:13 -07:00