Skip to content

Commit

Permalink
Update mockkubeapiserver/putresource.go
Browse files Browse the repository at this point in the history
Co-authored-by: Tomas Aschan <1550920+tomasaschan@users.noreply.github.com>
  • Loading branch information
justinsb and tomasaschan committed Jun 8, 2024
1 parent 8bee494 commit 40d320f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mockkubeapiserver/putresource.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ func (req *putResource) Run(ctx context.Context, s *MockKubeAPIServer) error {
return req.writeResponse(original)
}

bumpGeneration := !reflect.DeepEqual(original.Object["spec"], updated.Object["spec"])
if bumpGeneration {
specIsSame := reflect.DeepEqual(original.Object["spec"], updated.Object["spec"])
if !specIsSame {
generation := updated.GetGeneration()
generation++
updated.SetGeneration(generation)
Expand Down

0 comments on commit 40d320f

Please sign in to comment.