@@ -32,31 +32,31 @@ func NewPodDisruptionBudgetMatcher(objectMatcher ObjectMatcher) *podDisruptionBu
3232}
3333
3434// Match compares two autoscalev2beta1.HorizontalPodAutoscaler objects
35- func (m podDisruptionBudgetMatcher ) Match (old , new * policyv1beta1.PodDisruptionBudget ) (bool , error ) {
35+ func (m podDisruptionBudgetMatcher ) Match (oldOrig , newOrig * policyv1beta1.PodDisruptionBudget ) (bool , error ) {
3636 type PodDisruptionBudgetMatcher struct {
3737 ObjectMeta
3838 Spec policyv1beta1.PodDisruptionBudgetSpec
3939 }
4040
4141 oldData , err := json .Marshal (PodDisruptionBudgetMatcher {
42- ObjectMeta : m .objectMatcher .GetObjectMeta (old .ObjectMeta ),
43- Spec : old .Spec ,
42+ ObjectMeta : m .objectMatcher .GetObjectMeta (oldOrig .ObjectMeta ),
43+ Spec : oldOrig .Spec ,
4444 })
4545 if err != nil {
46- return false , emperror .WrapWith (err , "could not marshal old object" , "name" , old .Name )
46+ return false , emperror .WrapWith (err , "could not marshal old object" , "name" , oldOrig .Name )
4747 }
4848 newObject := PodDisruptionBudgetMatcher {
49- ObjectMeta : m .objectMatcher .GetObjectMeta (new .ObjectMeta ),
50- Spec : new .Spec ,
49+ ObjectMeta : m .objectMatcher .GetObjectMeta (newOrig .ObjectMeta ),
50+ Spec : newOrig .Spec ,
5151 }
5252 newData , err := json .Marshal (newObject )
5353 if err != nil {
54- return false , emperror .WrapWith (err , "could not marshal new object" , "name" , new .Name )
54+ return false , emperror .WrapWith (err , "could not marshal new object" , "name" , newOrig .Name )
5555 }
5656
5757 matched , err := m .objectMatcher .MatchJSON (oldData , newData , newObject )
5858 if err != nil {
59- return false , emperror .WrapWith (err , "could not match objects" , "name" , new .Name )
59+ return false , emperror .WrapWith (err , "could not match objects" , "name" , newOrig .Name )
6060 }
6161
6262 return matched , nil
0 commit comments