fix: Ensure changes in MatchCN annotation are detected (#11529)

Co-authored-by: Wouter Dullaert <wouter.dullaert@exoscale.ch>
This commit is contained in:
k8s-infra-cherrypick-robot 2024-07-02 01:29:41 -07:00 committed by GitHub
parent 6a111a974b
commit 52f89fa1be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 55 additions and 0 deletions

View file

@ -333,6 +333,15 @@ func TestEquals(t *testing.T) {
}
cfg2.PassCertToUpstream = true
// Different MatchCN
cfg1.MatchCN = "CN=(hello-app|goodbye)"
cfg2.MatchCN = "CN=(hello-app)"
result = cfg1.Equal(cfg2)
if result != false {
t.Errorf("Expected false")
}
cfg2.MatchCN = "CN=(hello-app|goodbye)"
// Equal Configs
result = cfg1.Equal(cfg2)
if result != true {