Merge pull request #16 from goodrain/V5.1

V5.1
This commit is contained in:
黄润豪 2019-03-28 14:05:16 +08:00 committed by GitHub
commit 3b0746862a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -55,9 +55,6 @@ func (s *SSLCert) Equals(c *SSLCert) bool {
return false
}
}
if !s.Certificate.Equal(c.Certificate) {
return false
}
if s.CertificateStr != c.CertificateStr {
return false
}

View File

@ -30,6 +30,14 @@ func TestSSLCert_Equals(t *testing.T) {
if !s.Equals(c) {
t.Errorf("s should equal c.")
}
s.Certificate = nil
if s.Equals(c) {
t.Errorf("s should not equal c.")
}
c.Certificate = nil
if !s.Equals(c) {
t.Errorf("s should equal c.")
}
}
func newFakeSSLCert() *SSLCert {