Skip to content

Commit

Permalink
fix: add missing status equal for SecurityPolicy
Browse files Browse the repository at this point in the history
Signed-off-by: bitliu <bitliu@tencent.com>
  • Loading branch information
Xunzhuo committed Oct 31, 2023
1 parent 57e1aec commit e8fb3f1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ func (u *UpdateWriter) Send(update Update) {
// GRPCRoute
// EnvoyPatchPolicy
// ClientTrafficPolicy
// SecurityPolicy
func isStatusEqual(objA, objB interface{}) bool {
opts := cmpopts.IgnoreFields(metav1.Condition{}, "LastTransitionTime")
switch a := objA.(type) {
Expand Down Expand Up @@ -232,6 +233,12 @@ func isStatusEqual(objA, objB interface{}) bool {
return true
}
}
case *egv1a1.SecurityPolicy:
if b, ok := objB.(*egv1a1.SecurityPolicy); ok {
if cmp.Equal(a.Status, b.Status, opts) {
return true
}

Check warning on line 240 in internal/status/status.go

View check run for this annotation

Codecov / codecov/patch

internal/status/status.go#L236-L240

Added lines #L236 - L240 were not covered by tests
}
}

return false
Expand Down

0 comments on commit e8fb3f1

Please sign in to comment.