Skip to content

Commit 40d320f

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mockkubeapiserver/putresource.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ func (req *putResource) Run(ctx context.Context, s *MockKubeAPIServer) error {
8989
return req.writeResponse(original)
9090
}
9191

92-
bumpGeneration := !reflect.DeepEqual(original.Object["spec"], updated.Object["spec"])
93-
if bumpGeneration {
92+
specIsSame := reflect.DeepEqual(original.Object["spec"], updated.Object["spec"])
93+
if !specIsSame {
9494
generation := updated.GetGeneration()
9595
generation++
9696
updated.SetGeneration(generation)

0 commit comments

Comments
 (0)