Increase Unit Test Code Coverage
Unit test coverge was increased to cover the usages of crypto. This helps to ensure that everything is working fine with fips mode enabled. Also updated sha1 to sha256 in registry/storage/driver/testsuites/testsuites.go because sha1 is not supported in fips mode. Signed-off-by: Naveed Jamil <naveed.jamil@tenpearl.com>
This commit is contained in:
parent
244d5246c2
commit
efdba4f210
4 changed files with 141 additions and 5 deletions
|
@ -10,10 +10,10 @@ import (
|
|||
"net/http/httptest"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/docker/distribution/manifest/schema1"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// TestHTTPSink mocks out an http endpoint and notifies it under a couple of
|
||||
|
@ -70,7 +70,7 @@ func TestHTTPSink(t *testing.T) {
|
|||
// first make sure that the default transport gives x509 untrusted cert error
|
||||
events := []Event{}
|
||||
err := sink.Write(events...)
|
||||
if !strings.Contains(err.Error(), "x509") {
|
||||
if !strings.Contains(err.Error(), "x509") && !strings.Contains(err.Error(), "unknown ca") {
|
||||
t.Fatal("TLS server with default transport should give unknown CA error")
|
||||
}
|
||||
if err := sink.Close(); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue