test: Remove broken mutex optimizations in helper

These optimizations don’t actually improve much, and complicate
things.

They also trigger a serious issue, due to the way gocheck is
implemented. If an Assert fails, it calls runtime.Goexit, which will
terminate the currently running goroutine. While terminating the
goroutine, Goexit unwinds the stack and runs any deferred functions.
In the bad case, Assert will fail while a mutex is unlocked, and
there will be another deferred Unlock, which will trigger a panic.

This panic will not have a complete stack trace due to
golang/go#9404.

The solution is to treat t.Assert as code that looks like:

    if err != nil {
      return
    }

and remember that all deferred functions will be run.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
Merge pull request #628 from flynn/fix-test-helper

test: Remove broken mutex optimizations in helper
all: Update etcd to v2.0.0-rc.1

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
all: Use IANA-assigned ports for etcd

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
appliance/etcd: Add CA certificates to container image

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
host: Update configuration file format

Configuration files are now JSON describing the arguments and
environment variables to add when running the daemon.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
host: Fix panic converting error in log

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
host: Add expose_env field to service manifest

Environment variables listed in this field are copied from the daemon
environment into the job.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
host: Configure etcd clustering via environment variables directly

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
pkg: Add etcdcluster package

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
host/cli: Add init command for configuring the cluster

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
host: Default to 1-node etcd configuration if none is specified

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
host: Lookup default external IP

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
discoverd: Bump etcd connection attempts to 10 minutes

When starting a v0.5 cluster for the first time it can take a while for
all of the nodes to show up.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
host: Bump discoverd connection attempts to 10 minutes

When starting a etcd v0.5 cluster for the first time it can take a while
for all of the nodes to show up.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
test/cluster: Update etcd configuration for v2.0

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
test: Don’t try to close nil stream

If errors occur while creating the stream, it will be nil, so check
after checking the error.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
test: Fix races in CLISuite.TestRoute

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
wip debug
wip debug