Skip to content

Commit 8bee494

Browse files
Update mockkubeapiserver/patchresource.go
Co-authored-by: Tomas Aschan <[email protected]>
1 parent 507f400 commit 8bee494

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mockkubeapiserver/patchresource.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ func (req *patchResource) Run(ctx context.Context, s *MockKubeAPIServer) error {
128128
klog.Infof("skipping write, object not changed")
129129
return req.writeResponse(existingObj)
130130
} else {
131-
bumpGeneration := !reflect.DeepEqual(existingObj.Object["spec"], updated.Object["spec"])
132-
if bumpGeneration {
131+
specIsSame := reflect.DeepEqual(existingObj.Object["spec"], updated.Object["spec"])
132+
if !specIsSame {
133133
generation := updated.GetGeneration()
134134
generation++
135135
updated.SetGeneration(generation)

0 commit comments

Comments
 (0)