Merge pull request #2636 from antoineco/bug/compare-snippet-equality
Add missing equality comparisons for ingress.Server
This commit is contained in:
commit
64936fa471
1 changed files with 18 additions and 9 deletions
|
@ -256,34 +256,43 @@ func (s1 *Server) Equal(s2 *Server) bool {
|
|||
if s1.Hostname != s2.Hostname {
|
||||
return false
|
||||
}
|
||||
if s1.Alias != s2.Alias {
|
||||
return false
|
||||
}
|
||||
if s1.SSLPassthrough != s2.SSLPassthrough {
|
||||
return false
|
||||
}
|
||||
if s1.SSLCertificate != s2.SSLCertificate {
|
||||
return false
|
||||
}
|
||||
if s1.SSLFullChainCertificate != s2.SSLFullChainCertificate {
|
||||
return false
|
||||
}
|
||||
if !s1.SSLExpireTime.Equal(s2.SSLExpireTime) {
|
||||
return false
|
||||
}
|
||||
if s1.SSLPemChecksum != s2.SSLPemChecksum {
|
||||
return false
|
||||
}
|
||||
if !(&s1.CertificateAuth).Equal(&s2.CertificateAuth) {
|
||||
return false
|
||||
}
|
||||
if s1.SSLFullChainCertificate != s2.SSLFullChainCertificate {
|
||||
if s1.Alias != s2.Alias {
|
||||
return false
|
||||
}
|
||||
if s1.RedirectFromToWWW != s2.RedirectFromToWWW {
|
||||
return false
|
||||
}
|
||||
|
||||
if len(s1.Locations) != len(s2.Locations) {
|
||||
if !(&s1.CertificateAuth).Equal(&s2.CertificateAuth) {
|
||||
return false
|
||||
}
|
||||
if s1.ServerSnippet != s2.ServerSnippet {
|
||||
return false
|
||||
}
|
||||
if s1.SSLCiphers != s2.SSLCiphers {
|
||||
return false
|
||||
}
|
||||
if s1.AuthTLSError != s2.AuthTLSError {
|
||||
return false
|
||||
}
|
||||
|
||||
if len(s1.Locations) != len(s2.Locations) {
|
||||
return false
|
||||
}
|
||||
|
||||
// Location are sorted
|
||||
for idx, s1l := range s1.Locations {
|
||||
|
|
Loading…
Reference in a new issue