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
router: Remove unused TLSConfig field

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
pkg/tlsconfig: Add package tlsconfig for secure tls configs

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
router: Use package tlsconfig for secure ciphersuites

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
test/runner: Use package tlsconfig for secure ciphersuites

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
Merge pull request #629 from flynn/tls

Use a secure TLS configuration
slugbuilder: Revert "build as root if BUILD_AS_ROOT is set"

This reverts commit a2e5abb6094d3f0e833f1ef1a2a0356a001c295b.

This feature was unused, and didn't fully realize the intended
goals. Originally merged in #552.

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 close
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>
Merge pull request #633 from flynn/test-nil-stream

test: Don’t try to close nil stream
Merge pull request #632 from flynn/revert-slugbuilder-root

slugbuilder: Revert "build as root if BUILD_AS_ROOT is set"
test: Ensure that the bridge MAC does not fluctuate

This is the fix for #223, we forgot to apply it here.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
Merge pull request #634 from flynn/test-route-races

test: Fix races in CLISuite.TestRoute
Merge pull request #635 from flynn/fix-ci-bridge

test: Ensure that the bridge MAC does not fluctuate
dashboard: Use json encoder for static js config

Signed-off-by: Jesse Stuart <jesse@jessestuart.ca>
Merge pull request #614 from flynn/dashboard-github-token

dashboard, bootstrap: Handle setting GITHUB_TOKEN in the app
dashbaord: Bump marbles-js

Signed-off-by: Jesse Stuart <jesse@jessestuart.ca>
dashboard: RouteLink component supports params prop

Signed-off-by: Jesse Stuart <jesse@jessestuart.ca>
dashboard: Add nav bar

Signed-off-by: Jesse Stuart <jesse@jessestuart.ca>