mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-05 05:07:38 +08:00
commit
3b0746862a
@ -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
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user