From e1bff721a76f1656dd7f35aac73f8a6007db4b7e Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Mon, 15 May 2017 14:33:31 -0400 Subject: [PATCH] Fixes master's unit tests, test failure. (#2763) * Fixes post-merge artifact breaking VA unit tests. * Fixes CI unit tests to fail build if tests fail. --- test.sh | 4 ++-- va/va_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test.sh b/test.sh index e2b2e1dec..3726e48ae 100755 --- a/test.sh +++ b/test.sh @@ -78,7 +78,7 @@ function run_unit_tests() { # Run the full suite of tests once with the -race flag. Since this isn't # running tests individually we can't collect coverage information. echo "running test suite with race detection" - go test -race -p 1 ${TESTPATHS} + run go test -race -p 1 ${TESTPATHS} else # When running locally, we skip the -race flag for speedier test runs. We # also pass -p 1 to require the tests to run serially instead of in @@ -99,7 +99,7 @@ function run_test_coverage() { echo "running test suite with coverage enabled and without race detection" for path in ${TESTPATHS}; do dir=$(basename $path) - go test -cover -coverprofile=${dir}.coverprofile ${path} || FAILURE=1 + run go test -cover -coverprofile=${dir}.coverprofile ${path} done # Gather all the coverprofiles diff --git a/va/va_test.go b/va/va_test.go index 330f14626..a964d9ff4 100644 --- a/va/va_test.go +++ b/va/va_test.go @@ -1343,7 +1343,7 @@ func TestFallbackTLS(t *testing.T) { // validation to fail since there is no IPv4 address/listener to fall back to. host = "ipv6.localhost" ident = core.AcmeIdentifier{Type: core.IdentifierDNS, Value: host} - va.stats = metrics.NewStatsdScope(mocks.NewStatter(), "VA") + va.stats = metrics.NewNoopScope() records, prob = va.validateChallenge(ctx, ident, chall) // The validation is expected to fail since there is no IPv4 to fall back to