Commit Graph

243 Commits (d19758b50101e2ea24d40a2357246efe6169dcc2)

Author SHA1 Message Date
Gyu-Ho Lee beb58c434c *: fix minor typos
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-03-08 16:21:52 -08:00
Gyu-Ho Lee bd6e6c11f8 test: run 'staticcheck'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-03-06 14:59:12 -08:00
Anthony Romano 4e1ce81e17 test: eschew you
Per https://github.com/coreos/docs/blob/master/STYLE.md#eschew-you
2017-03-06 09:16:03 -08:00
Anthony Romano 3296c15a32 test: run unused and gosimple over all packages at once
fmt pass went from ~20 CPU minutes to ~1 CPU minute.

Fixes #7377
2017-03-02 10:17:46 -08:00
fanmin shi edd298f85a test: build test binary for etcdctl 2017-02-28 17:08:24 -08:00
Gyu-Ho Lee 3eaf2f6558 *: remove trailing space, upgrade test on v3.1 2017-02-23 16:19:24 -08:00
fanmin shi b5be18a744 test: add e2e to coverage test 2017-02-17 14:15:26 -08:00
Anthony Romano e3f4b43614 test: clientv3 integration tests with proxy 2017-02-01 22:04:18 -08:00
Anthony Romano 072eda508b test: bump e2e timeout to 15 minutes
PPC64 timing out; integration tests already at 15 minutes.
2017-01-25 20:56:31 -08:00
Vimal Kumar 293c75b133 test: passed the test script arguments as the test function parameters 2017-01-18 21:28:57 +05:30
fanmin shi cbb6ede69d Merge pull request #7067 from fanminshi/rework_coverage_unit_integration
coverage: rework coverage for unit and integration tests
2016-12-30 10:13:07 -08:00
fanmin shi d9a3472894 coverage: rework code coverage for unit and integration tests 2016-12-29 17:19:03 -08:00
Anthony Romano f876ccb055 test: bump grpcproxy pass timeout to 15m
integration tests have a 15m timeout elsewhere. The lease stress tests
seem to have pushed the running time over 10m on proxy CI, causing
failures from timeout.
2016-12-28 14:56:57 -08:00
Gyu-Ho Lee 6ec4b9c26a test: exclude '_home' for gosimple, unused 2016-12-12 10:07:14 -08:00
Ben Darnell 10cead3139 test: Ignore gopath.proto in test script 2016-10-19 19:35:20 +08:00
Geoff Levand 3cbc5285e0 test: Run integration pass in series
On slower or heavily loaded platforms running the integration pass in
parallel results in test timeout errors.

Rename the integration_pass function to integration_e2e_pass, and add two
new functions integration_pass and e2e_pass.

Signed-off-by: Geoff Levand <geoff@infradead.org>
2016-10-05 15:35:14 -07:00
Geoff Levand 25f1088edd test: Fixes for release_pass
Some fixes related to release_pass:

o Create the output directory ./bin if it does not exist.
o Define the GOARCH variable if it is not defined.
o Simplify the race detection test.
o Download the relese archive based on GOARCH.
o If the release file is not found, return success.  This will allow the tests
  to continue.

Signed-off-by: Geoff Levand <geoff@infradead.org>
2016-10-04 13:42:53 -07:00
Gyu-Ho Lee 20211ed6bf test: grep versions with --sort 2016-09-23 15:49:20 -07:00
Gyu-Ho Lee 3aa2d1b40e test: test with v3.0 (preparation for v3.1) 2016-08-30 20:54:07 -07:00
Anthony Romano e1519cf460 build: don't override gopath by default, demote old gopath on override
Builds already vendor through cmd/ so there's no reason to set the GOPATH; it
was also breaking gofail builds. For builds that need to override GOPATH, also
include the old GOPATH as a fallback for dependencies outside cmd/vendor/.
2016-08-16 13:46:07 -07:00
Anthony Romano becbd9f3d6 test: grpcproxy integration test pass
Run via
PASSES=grpcproxy ./test
2016-07-20 15:58:33 -07:00
kayrus cab2e45319 build: allow to build outside the etcd directory
And added gopath hack which allows to build without setting any GOPATH
env. Just run the build script when you have installed golang.
2016-07-18 17:40:08 +02:00
Anthony Romano 1dfafd8fe0 test: separate phases of tests into configurable passes 2016-07-14 20:23:35 -07:00
Gyu-Ho Lee e5b5cf02d3 test: add upgrade test flag 2016-07-11 11:10:24 -07:00
Anthony Romano c30f89f1d0 client/integration: test v2 client one shot operations 2016-07-07 15:58:58 -07:00
Anthony Romano dc218fb41d test: use merge-base for commit title checking
Otherwise, will compare branch with forked master against upstream master.
2016-06-29 09:28:53 -07:00
Gyu-Ho Lee ede0b584b8 test: test builds on other projects 2016-06-28 15:03:19 -07:00
Hitoshi Mitake 555028f3d1 test: more accurate checking of commit title 2016-06-26 21:05:47 -07:00
Anthony Romano b7253992d4 test: check commit titles 2016-06-22 13:30:22 -07:00
Anthony Romano 7f8ffd7dbe test, build: support failpoints 2016-06-21 14:43:20 -07:00
Anthony Romano 6009e88077 test, build: make build script source-able without doing a build 2016-06-21 14:35:20 -07:00
Anthony Romano 6c0882145a test: don't use hardcoded package lists for testing 2016-06-17 11:41:49 -07:00
Xiang Li 7f569a163c test: go vet should only test the go code in the dir 2016-06-14 17:09:06 -07:00
Hitoshi Mitake 1727f278f2 test: remove a directory correctly
Current rm in the test script cannot the gopath/src correctly and
results test failure.
2016-05-20 13:42:36 +09:00
Anthony Romano e312bb675c test: fix wait on integration tests
Typo was causing failed tests to look like they passed on CI.
2016-05-16 06:32:38 -07:00
Gyu-Ho Lee fd7e2b20b0 test: fix typo, clean-up print statements 2016-05-10 23:05:58 -07:00
Geoff Levand b79bb6f164 travis: Enable arm64 builds
Setup a travis test matrix on a new variable 'TARGET', which specifies the CI
target.  Update the script section with a conditional that runs the needed
commands for each target.

Also, set go_import_path to make cloned repos work, enable the trusty VM, and
enable verbose builds when testing.

Signed-off-by: Geoff Levand <geoff@infradead.org>
2016-04-29 15:31:30 -07:00
Gyu-Ho Lee d893a78c38 test: add v3rpc, rpctypes 2016-04-29 11:00:02 -07:00
Anthony Romano 85edd66c65 test: run e2e and integration tests in parallel 2016-04-28 10:17:40 -07:00
Gyu-Ho Lee 14415c2187 auth: add tests 2016-04-27 10:13:36 -07:00
Anthony Romano b7ac758969 *: rename storage package to mvcc 2016-04-25 15:25:51 -07:00
Anthony Romano 46dfa682e7 test: display failure output for gosimple 2016-04-19 22:58:37 -07:00
Anthony Romano 9bfa0172f5 test, clientv3: run examples as integration tests 2016-04-15 11:51:30 -07:00
Anthony Romano 01be6933c6 test: check races on rafthttp
The data race in net/http has been fixed for a while.
2016-04-14 13:45:31 -07:00
Xiang Li 4a913ae60a proxy: initial userspace tcp proxy 2016-04-14 10:14:30 -07:00
Xiang Li 66d2ae7a39 proxy: move http related thing to httpproxy 2016-04-13 21:09:26 -07:00
Anthony Romano 2113b77635 test: display unused output if unused source found
unused will non-zero exit if it finds unused source which causes test's
set -e to close out of the test script
2016-04-11 09:55:22 -07:00
Gyu-Ho Lee 9aec045fce test, travis: integrate gosimple and unused 2016-04-07 23:16:33 -07:00
Anthony Romano b1d41016b2 vendor: only vendor on emitted binaries
Moves the vendor/ directory to cmd/vendor. Vendored binaries are built
from cmd/, which is backed by symlinks pointing back to repo root.
2016-04-05 21:01:16 -07:00
Xiang Li 2c50eb240e *: mv etcdhttp into api pkg 2016-04-04 16:31:35 -07:00
Anthony Romano b539d3a411 test: check formatting for all relevant packages in pkg/ 2016-03-30 15:14:24 -07:00
Anthony Romano 47db0a2f2e test: add race detection to clientv3 integration tests 2016-03-28 16:08:18 -07:00
Anthony Romano 9e7f47c490 etcdserver: Alarm RPC
Alarms are events that nodes can use to relay health information to
the rest of the cluster. A node may Activate an alarm and that alarm
will stay set until Deactivated.
2016-03-28 14:56:26 -07:00
Xiang Li 87d9f06a45 *: combine etcdctl and etcdctlv3 2016-03-28 11:28:05 -07:00
Anthony Romano 45cf31650c test: ignore vendor/ directory on license check 2016-03-22 17:33:46 -07:00
Anthony Romano f491110c5b test: check clientv3 has no dependency on etcdserver or storage packages 2016-03-17 11:31:14 -07:00
Anthony Romano f6d8059ac1 test: scan for exported godoc violations 2016-02-21 20:36:44 -08:00
Hitoshi Mitake e4d2ff3bd9 build, test: don't pass -a flag for go build during ordinal building
./build takes long time. On my Core i5 box, it requires almost 25
seconds. Without -a flag, it takes almost 15 seconds. Therefore this
commit reduces the flag in default. ./test activates -a via a new env
var GO_BUILD_FLAGS.
2016-02-09 14:11:44 +09:00
Gyu-Ho Lee 2e051c1c61 e2e: check regexp.MatchReader return, curl SSL issue
1. proc.ExpectRegex returns the result of regexp.MatchReader,
which does not return error even if there is no match of regex.
This fixes it by checking the boolean value and if the boolean
value is false, it returns error.

2. Adds more tests and finishes coreos#4259.

3. When we do the regex match correctly, curl request through SSL
returns error. For the purpose of debugging, I changed it to log
without failing the tests. etcdctl with SSL works fine.

4. Add // TODO: 'watch' sometimes times out in Semaphore CI environment but
works fine in every other environments.

5. increase test time
2016-02-01 12:20:53 -08:00
Gyu-Ho Lee 1767788074 *: expose integration functions for clientv3 2016-01-28 21:21:34 -08:00
Anthony Romano 64413927cc clientv3: support connection timeout 2016-01-28 13:25:45 -08:00
Anthony Romano 63197782ea test: trigger formatting tests before unit tests
Don't waste time running full unit tests only to fail CI over fmt or vet.
2016-01-19 11:39:39 -08:00
Anthony Romano 7d9a88a687 test: refactor sorts of tests into separate functions 2016-01-19 11:39:31 -08:00
Anthony Romano 6de07cf9ea e2e: etcd end-to-end tests
Uses gexpect to test the etcd binary directly. Tests #4135, #4171
2016-01-12 21:27:59 -08:00
Anthony Romano 58ac6aeb5a test: activate tests on contrib/raftexample
adds contrib/raftexample to integration tests and fixes two test races
2015-12-23 11:13:37 -08:00
Gyu-Ho Lee bbdd3c5f0e travis, test: allow failures with gotip
This allows tests to fail with Go tip, because go tip branch might not be
stable. This replaces https://github.com/coreos/etcd/pull/3953.
2015-12-04 11:16:59 -08:00
Hitoshi Mitake 7094c78dcd test: print diff with gofmt
Current test doesn't pass -d option to gofmt. Let's pass the option
for easy fix.

Example output:
Checking gofmt...
gofmt checking failed:
client/client.go
diff client/client.go gofmt/client/client.go
--- /tmp/gofmt741496847 2015-12-04 10:11:11.340651702 +0900
+++ /tmp/gofmt265273890 2015-12-04 10:11:11.340651702 +0900
@@ -41,7 +41,7 @@

 var DefaultTransport CancelableTransport = &http.Transport{
        Proxy: http.ProxyFromEnvironment,
-       Dial:(&net.Dialer{
+       Dial: (&net.Dialer{
                Timeout:   30 * time.Second,
                KeepAlive: 30 * time.Second,
        }).Dial,
@@ -265,7 +265,7 @@
                        return ErrNoEndpoints
                }

-               for i, _ := range c.endpoints {
+               for i := range c.endpoints {
                        if c.endpoints[i].String() == lu.String() {
                                c.pinned = i
                                break
2015-12-04 10:12:05 +09:00
Jonathan Boulle 108f97d63e test: add license header check 2015-09-15 14:09:01 -07:00
Xiang Li a6e67a6dec test: now raft has no shadow issue
We can test raft pkg now!
2015-09-04 10:52:14 -07:00
Yicheng Qin d2cb732c7b test: activate test on storage/backend 2015-08-28 13:52:31 -07:00
Yicheng Qin ccdb850e1e test: use go vet shadow feature instead of go-nyet
Use official support instead of home-made one.
2015-08-27 13:29:12 -07:00
Yicheng Qin 1e2b0acf6d test: activate test for storage package 2015-08-23 20:59:06 -07:00
Xiang Li 6b23a8131f *: test gofmt with -s and fix reported issues 2015-08-21 18:52:16 -07:00
Xiang Li 89bf5824c2 Merge pull request #3159 from sofuture/master
use /usr/bin/env to find bash
2015-08-09 10:56:12 -07:00
Jeff Zellner 1239e1ce6f test, scripts: use /usr/bin/env to find bash
use /usr/bin/env to find bash

add set -e back into scripts it was removed from
2015-08-08 20:52:53 -06:00
Brandon Philips 1b894c6b0b test: race detector doesn't work on armv7l
Test fails without this fix on armv7l:

    go test: -race is only supported on linux/amd64, freebsd/amd64, darwin/amd64 and windows/amd64
2015-08-08 18:11:41 -07:00
Xiang Li 2b8abeb093 *: remove migration related stuff from 2.2 2015-08-01 19:37:20 +08:00
Barak Michener 39c10d1fe4 auth: improve test coverage 2015-06-25 14:25:08 -04:00
Yicheng Qin 768cb437bc test: extend integration timeout to 10m
We test with `-cpu 1,2,4` now, and it takes longer time.
2015-06-12 13:41:35 -07:00
Xiang Li 2d21904cfd test: run with cpu = 1,2,4 2015-06-10 14:26:17 -07:00
Yicheng Qin fde7a7a10c test: run integration tests in verbose mode
Travis doesn't print out the final result of integration tests
sometimes, and verbose mode helps us debug.
2015-05-27 09:57:44 -07:00
Yicheng Qin 5e0077cc0c etcdserver: print out extra files in data dir instead of erroring 2015-03-24 18:56:22 -07:00
Yicheng Qin ee8325d62c test: not run race test on rafthttp pkg 2015-03-02 13:30:34 -08:00
Ben Darnell 79bc3f4774 Fix test for existence of go-nyet.
When the file is not found, `which` returns an empty string,
which passes the -f test. `command -v` is the most portable alternative
to `which` per
http://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script/677212#677212
2015-02-20 14:02:43 -05:00
Barak Michener 92dca0af0f *: remove shadowing of variables from etcd and add travis test
We've been bitten by this enough times that I wrote a tool so that
it never happens again.
2015-02-17 16:31:42 -05:00
Yicheng Qin 871e92ef73 pkg/osutil: add Unsetenv
go1.4 doesn't support static link well, so we stay in go1.3 for a while.
Implement Unsetenv in go1.3 way.
2015-02-04 10:29:20 -08:00
Brian Waldon d5f6b97b20 test: do not run integration tests by default
The ./test script will no longer run the integration tests. To run the
integration test, set the INTEGRATION env var to a nonzero value. For
example, `INTEGRATION=y ./test`.
2015-01-22 17:31:27 -08:00
Brian Waldon 2120af8cfc pkg: ioutils -> ioutil 2015-01-22 17:14:01 -08:00
Yicheng Qin 07a69430c1 *: move etcdserver/idutil -> pkg/idutil 2015-01-13 11:54:51 -08:00
Yicheng Qin 92f013393c test: remove no-test directory etcdserverpb 2015-01-08 14:46:13 -08:00
Yicheng Qin 9132098960 integration: wait longer for member to be removed 2015-01-07 13:36:59 -08:00
Xiang Li c3d2f5eea0 pbutil: add getbool to pbutil 2014-12-30 14:51:26 -08:00
Yicheng Qin 05c921229e etcdserver: add id generator 2014-12-29 13:03:04 -08:00
Kelsey Hightower 705ec45083 etcdmain: resolve DNS hostnames for client and peer URLs
etcd resolves DNS hostnames to IP addresses for client and peer URLs
before creating any listening sockets.

The following messages are logged during startup:

    etcd: Resolving infra0.coreos.com:2380 to 10.0.1.10:2380

Fixes #1991
2014-12-24 13:12:32 -05:00
Xiang Li 6b73a72d42 test: add fileutil to test 2014-12-14 19:34:54 -08:00
Yicheng Qin 7e6e305c4f Merge branch 'log_interface'
Conflicts:
	raft/raft.go
2014-11-25 14:22:11 -08:00
Yicheng Qin 61ce494386 rafthttp: limit the buffer for every read correctly 2014-11-24 17:39:39 -08:00
Xiang Li 6c8e294d20 test: longer test timeout 2014-11-24 08:37:26 -08:00
Ben Darnell 30690d15d9 Re-enable a few tests I had missed.
Fix integration test for the change to log entry zero.

Increase test timeouts since integration tests often take
longer than 10s for me.
2014-11-21 15:27:17 -05:00
Ben Darnell b29240baf0 Merge remote-tracking branch 'coreos/master' into merge
* coreos/master:
  scripts: build-docker tag and use ENTRYPOINT
  scripts: build-release add etcd-migrate
  create .godir
  raft: optimistically increase the next if the follower is already matched
  raft: add handleHeartbeat handleHeartbeat commits to the commit index in the message. It never decreases the commit index of the raft state machine.
  rafthttp: send takes raft message instead of bytes
  *: add rafthttp pkg into test list
  raft: include commitIndex in heartbeat
  rafthttp: move server stats in raftHandler to etcdserver
  *: etcdhttp.raftHandler -> rafthttp.RaftHandler
  etcdserver: rename sender.go -> sendhub.go
  *: etcdserver.sender -> rafthttp.Sender

Conflicts:
	raft/log.go
	raft/raft_paper_test.go
2014-11-19 17:05:16 -05:00
Yicheng Qin 04d416291a *: add rafthttp pkg into test list 2014-11-17 16:45:54 -08:00
Ben Darnell 300c5a2001 Merge remote-tracking branch 'coreos/master' into log-storage-interface
* coreos/master: (21 commits)
  etcdserver: refactor ValidateClusterAndAssignIDs
  integration: add integration test for remove member
  integration: add test for member restart
  version: bump to alpha.3
  etcdserver: add buffer to the sender queue
  *: gracefully stop etcdserver
  Fix up migration tool, add snapshot migration
  etcd4: migration from v0.4 -> v0.5
  etcdserver: export Member.StoreKey
  etcdserver: recover cluster when receiving newer snapshot
  etcdserver: check and select committed entries to apply
  etcdserver: recover from snapshot before applying requests
  raft: not set applied when restored from snapshot
  sender: support elegant stop
  etcdserver: add StopNotify
  etcdserver: fix TestDoProposalStopped test
  etcdserver: minor cleanup
  etcdserver: validate new node is not registered before in best effort
  etcdserver: fix server.Stop()
  *: print out configuration when necessary
  ...

Conflicts:
	etcdserver/server.go
	etcdserver/server_test.go
	raft/log.go
2014-11-17 18:28:24 -05:00
Barak Michener 192f200d9e Fix up migration tool, add snapshot migration
Fixes all updates since bcwaldon sketched the original, with cleanup and
into an acutal working state. The commit log follows:

fix pb reference and remove unused file post rebase

unbreak the migrate folder

correctly detect node IDs

fix snapshotting

Fix previous broken snapshot

Add raft log entries to the translation; fix test for all timezones. (Still in progress, but passing)

Fix etcd:join and etcd:remove

print more data when dumping the log

Cleanup based on yichengq's comments

more comments

Fix the commited index based on the snapshot, if one exists

detect nodeIDs from snapshot

add initial tool documentation and match the semantics in the build script and main

formalize migration doc

rename function and clarify docs

fix nil pointer

fix the record conversion test

add migration to test suite and fix govet
2014-11-14 16:46:08 -05:00
Ben Darnell b29c512f50 Merge remote-tracking branch 'coreos/master' into log-storage-interface
* coreos/master: (27 commits)
  pkg/wait: move wait to pkg/wait
  etcdserver: do not add/remove/update local member to/from sender hub
  etcdserver: not record attributes when add member
  raft: add a test for proposeConfChange
  raft: block Stop() on n.done, support idempotency
  raft: add a test for node proposal
  integration: add increase cluster size test
  integration: remove unnecessary t.Testing argument
  raft: stop the node synchronously
  integration: fix test to propagate NewServer errors
  etcdserver: move peer URLs check to config
  etcdserver: ensure initial-advertise-peer-urls match initial-cluster
  raft: add a test for node.Tick
  raft: add comment string for TestNodeStart
  etcdserver: use member instead of node at etcd level
  raft: nodes return sorted ids
  raft: update unstable when calling stableTo with 0
  *: support updating advertise-peer-url Users might want to update the peerurl of the etcd member in several cases. For example, if the IP address of the physical machine etcd running on is changed, user need to update the adversite-pee-rurl accordingly. This commit makes etcd support updating the advertise-peer-url of its members.
  transport: create a tls listener only if the tlsInfo is not empty and the scheme is HTTPS
  etcdserver: use member pointer for all tests
  ...

Conflicts:
	etcdserver/server.go
	raft/log.go
	raft/log_test.go
	raft/node.go
2014-11-13 14:21:09 -05:00
Xiang Li 0d18a0f381 pkg/wait: move wait to pkg/wait 2014-11-13 09:11:53 -08:00
Ben Darnell 25b6590547 raft: introduce log storage interface.
This change splits the raftLog.entries array into an in-memory
"unstable" list and a pluggable interface for retrieving entries that
have been persisted to disk. An in-memory implementation of this
interface is provided which behaves the same as the old version;
in a future commit etcdserver could replace the MemoryStorage with
one backed by the WAL.
2014-11-10 17:40:39 -05:00
Brandon Philips bdd2a0a018 test: add error package 2014-11-05 13:31:42 -08:00
Jonathan Boulle 55c92ad456 *: create ID type
This creates a simple ID type (wrapped around uint64) to provide for
standard serialization/deserialization to a string (i.e. base 16
encoded). This replaces strutil so now that package is removed.
2014-10-31 10:34:07 -07:00
Jonathan Boulle cf9dd31daa etcd: move main logic to etcdmain subpackage 2014-10-29 18:43:22 -07:00
Brian Waldon 480e92d340 strutil: move IDAsHex/IDFromHex to new pkg 2014-10-27 18:39:09 -07:00
Brian Waldon 54a2d8ffc9 client: move Member models to new types pkg 2014-10-27 11:22:46 -07:00
Jonathan Boulle 6e6d1897d8 pkg: move everything into subpackages 2014-10-27 09:57:28 -07:00
Brian Waldon 29ef918808 etcdctl: import from external repo 2014-10-22 17:52:40 -07:00
Jonathan Boulle 341c7190d3 test: add govet to tests 2014-10-21 11:32:38 -07:00
Jonathan Boulle ae4403c945 test: add discovery to tests 2014-10-21 00:17:14 -07:00
Yicheng Qin 1b7947357f *: pkg functional -> integration 2014-10-20 14:43:21 -07:00
Yicheng Qin 058537f34a main: add basic functional test 2014-10-20 14:43:21 -07:00
Brandon Philips 78a9bba276 pkg/types/flags: introduce flags package
I want to use the Addrs type in another experimental proxy that I am
implementing. Pull it out into a separate package.
2014-09-28 14:56:30 -07:00
Xiang Li f393b1459a functional: remove functional 2014-09-25 11:34:39 -07:00
Xiang Li a0f5625728 pkg: move /transport to pkg/transport 2014-09-25 10:47:14 -07:00
Brian Waldon 4a65813a66 test: alphabetize list of testable packages 2014-09-24 16:37:46 -07:00
Brian Waldon e30c1eeefd pkg: move SetFlagsFromEnv to pkg package 2014-09-24 16:29:47 -07:00
Brian Waldon 314c13a8f0 pkg: move DeprecatedFlag to new package 2014-09-24 16:09:37 -07:00
Brian Waldon 17459c7bfc transport: wrap net.Listener with TLSInfo 2014-09-22 17:58:30 -07:00
Brandon Philips fd48f3f2a4 test: stop running gofmt ./
gofmt ./ will recursively check the .git directory. So use *.go for
gofmt instead
2014-09-22 17:28:31 -07:00
Brian Waldon 49cc76d33b client: min client for discovery 2014-09-21 10:29:52 -07:00
Brian Waldon fcf50e756d test: actually test main pkg 2014-09-18 11:01:00 -07:00
Xiang Li 79b8153eac test: test with race by default 2014-09-14 13:08:14 -07:00
Xiang Li 9bd9d88a9d test: sort the pkgs 2014-09-11 12:48:18 -07:00
Xiang Li 0feb153034 test: test wait pkg 2014-09-11 12:38:43 -07:00
Brian Waldon e5a482266f proxy: introduce director
The director class drives an httputil.ReverseProxy. This is used when
etcd is deployed in proxy mode.
2014-09-10 18:04:03 -07:00
Brandon Philips e5cc58c179 Merge pull request #1032 from jonboulle/fix_tests
scripts: use bash for build script
2014-09-09 14:21:51 -07:00
Jonathan Boulle 800de8e3bf scripts: use bash for build script 2014-09-09 11:34:55 -07:00
Jonathan Boulle 07ce8bc4bc etcdserver: split out functional test to new package 2014-09-09 11:18:24 -07:00
Jonathan Boulle 491362f5db scripts: add build, cover and update test
This adds a build script that attempts to be as user friendly as
possible: if they have already set $GOPATH and/or $GOBIN, use those
environment variables. If not, create a gopath for them in this
directory. This should facilitate both `go get` and `git clone` usage.

The `test` script is updated, and the new `cover` script facilitates
easy coverage generation for the repo's constituent packages by setting
the PKG environment variable.
2014-09-08 23:09:49 -07:00
Brandon Philips 91c52630b6 test: introduce test script
Why do this? `go test ./...` has a ton of annoying output:

```
?   	github.com/coreos/etcd	[no test files]
?   	github.com/coreos/etcd/crc	[no test files]
?   	github.com/coreos/etcd/elog	[no test files]
?   	github.com/coreos/etcd/error	[no test files]
ok  	github.com/coreos/etcd/etcdserver	0.267s
ok  	github.com/coreos/etcd/etcdserver/etcdhttp	0.022s
?   	github.com/coreos/etcd/etcdserver/etcdserverpb	[no test files]
ok  	github.com/coreos/etcd/raft	0.157s
?   	github.com/coreos/etcd/raft/raftpb	[no test files]
ok  	github.com/coreos/etcd/snap	0.018s
?   	github.com/coreos/etcd/snap/snappb	[no test files]
third_party/code.google.com/p/gogoprotobuf/proto/testdata/test.pb.go🔢
undefined: __emptyarchive__.Extension
ok  	github.com/coreos/etcd/store	4.247s
ok
github.com/coreos/etcd/third_party/code.google.com/p/go.net/context
2.724s
FAIL
github.com/coreos/etcd/third_party/code.google.com/p/gogoprotobuf/proto
[build failed]
ok
github.com/coreos/etcd/third_party/github.com/stretchr/testify/assert
0.013s
ok  	github.com/coreos/etcd/wait	0.010s
ok  	github.com/coreos/etcd/wal	0.024s
?   	github.com/coreos/etcd/wal/walpb	[no test files]
```

And we have no had to manually configure drone.io which I want to avoid:
https://drone.io/github.com/coreos/etcd/admin
2014-09-08 16:18:10 -07:00
Ben Johnson fb7a91739a Remove functional tests. 2013-10-14 14:20:50 -06:00
Ben Johnson 63e128670e Fix etcd.NewClient(). 2013-10-14 09:55:57 -06:00
Xiang Li 1527b7008c fix test 2013-08-17 21:21:18 -07:00
Xiang Li 5bd24d8271 wait for exit and release resource 2013-08-17 08:30:32 -07:00
Xiang Li 177854c3e1 add test package. do not compile test codes with etcd 2013-08-17 08:30:31 -07:00
Brandon Philips 436e2a857f fix(test): update this to use build
use all of the same packages as the build script
2013-08-06 17:20:58 -07:00
Xiang Li 8ad7a23648 init test suit for etcd 2013-07-29 15:57:37 -07:00