Commit Graph

5870 Commits

Author SHA1 Message Date
Frank Schroeder a9451d596f
agent: set tcpKeepAliveListener when there is no error 2017-05-31 10:24:32 +02:00
Frank Schroeder e48df7b572
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 345666bdb6
test: use test name as log prefix 2017-05-31 09:54:09 +02:00
Frank Schroeder d6c7404b34
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 30ba712857
agent: set proto to http since we are logging it now 2017-05-31 09:41:16 +02:00
Frank Schroeder ceda18366f
test: Use Bool() instead of &BoolTrue/False since 2017-05-31 09:21:01 +02:00
Frank Schroeder 1b0d58bb22
test: don't panic if there is no error 2017-05-31 08:59:41 +02:00
Frank Schroeder ec729693d7
Address review comments 2017-05-31 01:05:21 +02:00
Frank Schroeder 26200929c1
agent: start HTTPS only if there is a cert and key 2017-05-31 00:29:29 +02:00
Frank Schroeder b6c69ebf5d
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 f4aa2ada4f
test: fail if there is no leader 2017-05-31 00:29:29 +02:00
Frank Schroeder c0680660d5
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 205cbe5fc8
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 aa92adcdd5
test: increase sleep time for test 2017-05-31 00:29:28 +02:00
Frank Schroeder f498f24032
test: allow tests to control anti-entropy syncs 2017-05-31 00:29:28 +02:00
Frank Schroeder eea16e1640
test: run mock dns recursors on random ports 2017-05-31 00:29:28 +02:00
Frank Schroeder 6148910399
test: skip tests that use cmd.Run until signal handling is fixed 2017-05-31 00:29:28 +02:00
Frank Schroeder 56cf015117
test: add test for starting/stopping lots of agents 2017-05-31 00:29:28 +02:00
Frank Schroeder 7c5892a196
test: use UniqueID prefix for check tests to unify log output 2017-05-31 00:29:28 +02:00
Frank Schroeder 0a31094e06
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 10540f8d5f
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 fe777852cd
test: call t.Fatal() from main go routine 2017-05-31 00:29:27 +02:00
Frank Schroeder 3e39f04527
dns: do not log socket close during shutdown 2017-05-31 00:29:27 +02:00
Frank Schroeder 1df74e36bd
agent: print more useful shutdown message 2017-05-31 00:29:27 +02:00
Frank Schroeder f15e90bc9a
consul: use correct shutdownCh for Router 2017-05-31 00:29:27 +02:00
Frank Schroeder 2e14c09447
test: start sync after agent start 2017-05-31 00:29:27 +02:00
Frank Schroeder 5b5566d916
test: add test name to output 2017-05-31 00:29:27 +02:00
Frank Schroeder 28ed8f1847
test: perform blocking query on agent 2017-05-31 00:29:27 +02:00
Frank Schroeder ebc0c80f08
test: parallelize dns test 2017-05-31 00:29:26 +02:00
Frank Schroeder 72c214b908
test: fix failing test 2017-05-31 00:29:26 +02:00
Frank Schroeder c5f565ee1a
test: remove output to stdout 2017-05-31 00:29:26 +02:00
Frank Schroeder 8f943542b0
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 b56ffc93cb
test: run consul tests in parallel 2017-05-31 00:29:26 +02:00
Frank Schroeder 0325a42089
test: fix data race with endpoints 2017-05-31 00:29:26 +02:00
Frank Schroeder e16589c079
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 632f837c98
agent: shutdown dns servers on error 2017-05-31 00:29:26 +02:00
Frank Schroeder 8c1a668481
test: Shutdown half-started agent before retrying 2017-05-31 00:29:25 +02:00
Frank Schroeder 584693482d
test: fix data race in MockNotify
42 -> 32 data races
2017-05-31 00:29:25 +02:00
Frank Schroeder d5f87a20cf
vendor: fix data race in github.com/armon/go-metrics/start.go
96 -> 42 data races
2017-05-31 00:29:25 +02:00
Frank Schroeder 3caadb37ac
vendor: update github.com/mitchellh/cli
This pulls in the patch that fixes the nil panic and the
data race in MockUi.
2017-05-31 00:29:25 +02:00
Frank Schroeder 53fd15070d
build: add target for running tests with race detector 2017-05-31 00:29:25 +02:00
Frank Schroeder 9509ab463c
test: run command tests in parallel 2017-05-31 00:29:25 +02:00
Frank Schroeder 3658d4d428
test: address pull request comments 2017-05-31 00:29:25 +02:00
Frank Schroeder 0f912c8aad
test: remove ACL options from default test config 2017-05-31 00:29:25 +02:00
Frank Schroeder bc47972696
test: allocate ports in blocks of 10 2017-05-31 00:29:24 +02:00
Frank Schroeder 53c1c86ab3
test: refactor command tests to use TestAgent 2017-05-31 00:29:24 +02:00
Frank Schroeder 24eec373de
test: retry a bit more often 2017-05-31 00:29:24 +02:00
Frank Schroeder 659d7dbbde
agent: rename *Config vars to 'cfg' 2017-05-31 00:29:24 +02:00
Frank Schroeder e86d34685f
agent: rename *Command vars to 'cmd'
'c' is ambigious and it conflicts with 'config'.
2017-05-31 00:29:24 +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