mirror of
https://github.com/docker/docs.git
synced 2026-04-02 17:28:55 +07:00
fix https
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
This commit is contained in:
@@ -3,10 +3,12 @@ package docker
|
||||
import (
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"github.com/dotcloud/docker/api/client"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/dotcloud/docker/api/client"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -56,7 +58,7 @@ func TestHttpsInfoRogueCert(t *testing.T) {
|
||||
if err == nil {
|
||||
t.Fatal("Expected error but got nil")
|
||||
}
|
||||
if err.Error() != errBadCertificate {
|
||||
if !strings.Contains(err.Error(), errBadCertificate) {
|
||||
t.Fatalf("Expected error: %s, got instead: %s", errBadCertificate, err)
|
||||
}
|
||||
})
|
||||
@@ -74,7 +76,7 @@ func TestHttpsInfoRogueServerCert(t *testing.T) {
|
||||
t.Fatal("Expected error but got nil")
|
||||
}
|
||||
|
||||
if err.Error() != errCaUnknown {
|
||||
if !strings.Contains(err.Error(), errCaUnknown) {
|
||||
t.Fatalf("Expected error: %s, got instead: %s", errBadCertificate, err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user