Commit Graph

8 Commits (d8a53ca7167e7f16dff4b38d4f6ce969819ef225)

Author SHA1 Message Date
Tomás Senart b6053d6a86 Making code formatting consistent.
$ gofmt -s -w  && goimports -w
2014-03-27 14:19:08 +01:00
Yicheng Qin 3a4df1612c feat(discovery): adjust boot order to find peers
The boot order for peers is -discovery, -peers, log data, forming
new cluster itself.

Special rules:
1. If discovery succeeds, it would find peers specified by discover URL
only.
2. Etcd would fail when meeting bad -discovery, no -peers and log data.

Add TestDiscoveryDownNoBackupPeersWithDataDir as the test.
2014-02-17 12:53:39 -08:00
Yicheng Qin bd56b15b6e fix(tests/discovery): use host as -peers parameter instead of url
Or it cannot test the functionality correctly.
Moreover, add TestDiscoveryNoWithBackupPeers as the test for it.
2014-02-14 18:23:41 -08:00
Brandon Philips 21d7d14178 chore(tests/discovery): remove errant debug statement 2014-02-06 22:10:10 -08:00
Brandon Philips bfbc539321 hack(tests/discovery): don't use go-etcd for watch
go-etcd has a bug in the watcher that holds open a goroutine. Avoid
goetcd for this operation until it is fixed.
2014-02-06 22:10:10 -08:00
Brandon Philips 5f124166eb feat(tests/discovery): use low retry interval
In TestDiscoverySecondPeerFirstNoResponse use a low retryinterval so the
test doesn't take forever.
2014-02-06 22:10:10 -08:00
Brandon Philips cbdf4a738c fix(discovery): use prevExist instead of prevValue=init
Use PUT /_state?prevExist=true in the protocol instead of PUT
/_state?prevValue=init. This lets people point one vanilla etcd at the
key prefix of another vanilla etcd and have it just work.
2014-02-05 15:14:57 -08:00
Brandon Philips 2822b9c579 tests(tests/functional): add tests for Discovery
This tests a variety of failure cases for the Discovery service
including:

- Initial leader failures
- Discovery service failures
- Positive tests for discovery working flawlessly
2014-02-05 09:27:39 -08:00