Frank Schroeder
7f18fe1a5b
agent: LastContact cannot be negative ( #3067 )
...
The X-Consul-LastContact header cannot be negative.
Fixes #3067
2017-06-01 18:20:12 +02:00
Frank Schroeder
b66eb6b6ac
vendor: upgrade github.com/go-ole/go-ole
...
This replaces the monkey patch for github.com/go-ole/go-ole/pull/144
See #3097
2017-06-01 16:05:24 +02:00
Frank Schroeder
1d30241784
vendor: monkey patch github.com/go-ole/go-ole support for s390x
...
Remove this once https://github.com/go-ole/go-ole/pull/144 gets
merged.
Fixes #3097
2017-06-01 15:31:29 +02:00
Frank Schroeder
9ea307a90d
Revert "vendor: monkey patch github.com/go-ole/go-ole support for s390x"
...
This reverts commit 50fe2148a81a2d91c7b6f75246f16b452d811e0f.
2017-06-01 15:31:02 +02:00
Frank Schroeder
047b35bd92
vendor: monkey patch github.com/go-ole/go-ole support for s390x
...
Remove this once https://github.com/go-ole/go-ole/pull/144 gets
merged.
2017-06-01 15:29:47 +02:00
Frank Schroeder
5a17fabc50
test: use random ports for consul tests
2017-05-31 12:15:55 +02:00
Frank Schroeder
dbe8009968
test: replace one more BoolFalse with agent.Bool()
2017-05-31 11:41:17 +02:00
Frank Schroeder
00117ed09b
test: we will not use dev mode for testing for now
2017-05-31 11:34:00 +02:00
Frank Schroeder
d14182c2de
test: stagger retry attempts of TestAgent.Start
2017-05-31 11:33:25 +02:00
Frank Schroeder
5224699341
test: make TestAgent setup reusable
...
Pick the random ports only once and try starting with them
a number of times so that the configuration can be re-used.
This is because the ports are written into the data files
and a subsequent agent reading the files needs to have the
same ports.
For the same reason we do not remove the data directory on
every attempt since this makes it impossible to re-read the
data files.
2017-05-31 11:32:31 +02:00
Frank Schroeder
b06c969deb
agent: use agent logger for consul client and deps
2017-05-31 11:05:02 +02:00
Frank Schroeder
2588f22be7
test: start secondary agents also via TestAgent
2017-05-31 10:56:19 +02:00
Frank Schroeder
4e6e9cb05a
agent: set tcpKeepAliveListener when there is no error
2017-05-31 10:24:32 +02:00
Frank Schroeder
2f1947c862
test: run all tests together again
...
Looks like I have eliminated the troublesome tests for now.
2017-05-31 10:00:10 +02:00
Frank Schroeder
cfe101ce49
test: use test name as log prefix
2017-05-31 09:54:09 +02:00
Frank Schroeder
c587561572
agent: simplify shutdown timeout logging
...
Note that we are currently timing out every time. This still
needs to be investigated.
2017-05-31 09:41:58 +02:00
Frank Schroeder
b220133785
agent: set proto to http since we are logging it now
2017-05-31 09:41:16 +02:00
Frank Schroeder
361b69bb30
test: Use Bool() instead of &BoolTrue/False since
2017-05-31 09:21:01 +02:00
Frank Schroeder
4e3b58ef4d
test: don't panic if there is no error
2017-05-31 08:59:41 +02:00
Frank Schroeder
bb8a21c385
Address review comments
2017-05-31 01:05:21 +02:00
Frank Schroeder
78cd7a9087
agent: start HTTPS only if there is a cert and key
2017-05-31 00:29:29 +02:00
Frank Schroeder
45a9c2be8b
agent: refactor DNS and HTTP server
...
* refactor DNS server to be ready for multiple bind addresses
* drop tcpKeepAliveListener since it is default for the HTTP servers
* add startup timeout watcher for HTTP servers identical to DNS server
2017-05-31 00:29:29 +02:00
Frank Schroeder
46526a8d1d
test: fail if there is no leader
2017-05-31 00:29:29 +02:00
Frank Schroeder
c38fbff292
vendor: patch github.com/mitchellh/cli until help output is fixed
...
We need to init the flagset that cli uses to generate the help
outside of the Run method since Run isn't called anymore for
printing help.
2017-05-31 00:29:29 +02:00
Frank Schroeder
946428134e
build: update makefile
...
* capture all output to test.log only and print only failures
* always print output on travis
* test github.com/hashicorp/consul/consul separately until we've
found the interactions with the other packages during testing.
2017-05-31 00:29:28 +02:00
Frank Schroeder
35757e6c09
test: increase sleep time for test
2017-05-31 00:29:28 +02:00
Frank Schroeder
42ade30551
test: allow tests to control anti-entropy syncs
2017-05-31 00:29:28 +02:00
Frank Schroeder
5735b31ebc
test: run mock dns recursors on random ports
2017-05-31 00:29:28 +02:00
Frank Schroeder
d07f2a2542
test: skip tests that use cmd.Run until signal handling is fixed
2017-05-31 00:29:28 +02:00
Frank Schroeder
83d9fb77b7
test: add test for starting/stopping lots of agents
2017-05-31 00:29:28 +02:00
Frank Schroeder
dc1548af06
test: use UniqueID prefix for check tests to unify log output
2017-05-31 00:29:28 +02:00
Frank Schroeder
828f40054a
test: improve TestAgent
...
* don't use retry to try restarting the agent
this caused some issues when the startup would fail in
a separate go routine
* clear out the data directory on every retry since the ports
are stored in the raft data files
* set a unique id for every agent to allow for tracking of
concurrent output
2017-05-31 00:29:28 +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
a433d13b20
test: call t.Fatal() from main go routine
2017-05-31 00:29:27 +02:00
Frank Schroeder
9d4529972e
dns: do not log socket close during shutdown
2017-05-31 00:29:27 +02:00
Frank Schroeder
ae5270a1e1
agent: print more useful shutdown message
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
f53b90c16b
test: start sync after agent start
2017-05-31 00:29:27 +02:00
Frank Schroeder
bb3b099d60
test: add test name to output
2017-05-31 00:29:27 +02:00
Frank Schroeder
9fbac59f78
test: perform blocking query on agent
2017-05-31 00:29:27 +02:00
Frank Schroeder
36a2312639
test: parallelize dns test
2017-05-31 00:29:26 +02:00
Frank Schroeder
a2b29bea9f
test: fix failing test
2017-05-31 00:29:26 +02:00
Frank Schroeder
d0cb508382
test: remove output to stdout
2017-05-31 00:29:26 +02:00
Frank Schroeder
846fe5d630
test: use cli.NewMockUi instead of new(cli.MockUi)
...
Use the constructor function to prevent a nil panic
if there was no write to the output buffers.
2017-05-31 00:29:26 +02:00
Frank Schroeder
d84e7f9798
test: run consul tests in parallel
2017-05-31 00:29:26 +02:00
Frank Schroeder
ad153f0e76
test: fix data race with endpoints
2017-05-31 00:29:26 +02:00
Frank Schroeder
449eceec11
agent: shutdown delegate if created
...
When the TestAgent shuts down a half-started agent
the delegate may not have been created at this point.
2017-05-31 00:29:26 +02:00
Frank Schroeder
6a40fe026e
agent: shutdown dns servers on error
2017-05-31 00:29:26 +02:00
Frank Schroeder
60a47addc7
test: Shutdown half-started agent before retrying
2017-05-31 00:29:25 +02:00
Frank Schroeder
d1ee368da9
test: fix data race in MockNotify
...
42 -> 32 data races
2017-05-31 00:29:25 +02:00