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.
This commit is contained in:
parent
b17b5c72a6
commit
e1bff721a7
4
test.sh
4
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
|
# Run the full suite of tests once with the -race flag. Since this isn't
|
||||||
# running tests individually we can't collect coverage information.
|
# running tests individually we can't collect coverage information.
|
||||||
echo "running test suite with race detection"
|
echo "running test suite with race detection"
|
||||||
go test -race -p 1 ${TESTPATHS}
|
run go test -race -p 1 ${TESTPATHS}
|
||||||
else
|
else
|
||||||
# When running locally, we skip the -race flag for speedier test runs. We
|
# 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
|
# 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"
|
echo "running test suite with coverage enabled and without race detection"
|
||||||
for path in ${TESTPATHS}; do
|
for path in ${TESTPATHS}; do
|
||||||
dir=$(basename $path)
|
dir=$(basename $path)
|
||||||
go test -cover -coverprofile=${dir}.coverprofile ${path} || FAILURE=1
|
run go test -cover -coverprofile=${dir}.coverprofile ${path}
|
||||||
done
|
done
|
||||||
|
|
||||||
# Gather all the coverprofiles
|
# Gather all the coverprofiles
|
||||||
|
|
|
@ -1343,7 +1343,7 @@ func TestFallbackTLS(t *testing.T) {
|
||||||
// validation to fail since there is no IPv4 address/listener to fall back to.
|
// validation to fail since there is no IPv4 address/listener to fall back to.
|
||||||
host = "ipv6.localhost"
|
host = "ipv6.localhost"
|
||||||
ident = core.AcmeIdentifier{Type: core.IdentifierDNS, Value: host}
|
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)
|
records, prob = va.validateChallenge(ctx, ident, chall)
|
||||||
|
|
||||||
// The validation is expected to fail since there is no IPv4 to fall back to
|
// The validation is expected to fail since there is no IPv4 to fall back to
|
||||||
|
|
Loading…
Reference in New Issue