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 {
|
if s1.Hostname != s2.Hostname {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if s1.Alias != s2.Alias {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if s1.SSLPassthrough != s2.SSLPassthrough {
|
if s1.SSLPassthrough != s2.SSLPassthrough {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if s1.SSLCertificate != s2.SSLCertificate {
|
if s1.SSLCertificate != s2.SSLCertificate {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
if s1.SSLFullChainCertificate != s2.SSLFullChainCertificate {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if !s1.SSLExpireTime.Equal(s2.SSLExpireTime) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
if s1.SSLPemChecksum != s2.SSLPemChecksum {
|
if s1.SSLPemChecksum != s2.SSLPemChecksum {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if !(&s1.CertificateAuth).Equal(&s2.CertificateAuth) {
|
if s1.Alias != s2.Alias {
|
||||||
return false
|
|
||||||
}
|
|
||||||
if s1.SSLFullChainCertificate != s2.SSLFullChainCertificate {
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if s1.RedirectFromToWWW != s2.RedirectFromToWWW {
|
if s1.RedirectFromToWWW != s2.RedirectFromToWWW {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
if !(&s1.CertificateAuth).Equal(&s2.CertificateAuth) {
|
||||||
if len(s1.Locations) != len(s2.Locations) {
|
return false
|
||||||
|
}
|
||||||
|
if s1.ServerSnippet != s2.ServerSnippet {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if s1.SSLCiphers != s2.SSLCiphers {
|
if s1.SSLCiphers != s2.SSLCiphers {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
if s1.AuthTLSError != s2.AuthTLSError {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(s1.Locations) != len(s2.Locations) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
// Location are sorted
|
// Location are sorted
|
||||||
for idx, s1l := range s1.Locations {
|
for idx, s1l := range s1.Locations {
|
||||||
|
|
Loading…
Reference in a new issue