Skip to content

Commit

Permalink
test: utils: use updated profile, not original (#764)
Browse files Browse the repository at this point in the history
UpdateWithRetry wants to get a fresh copy of the profile
to update to avoid conflicts; because of a copy/paste
mistake, it was trying to reapply the original profile,
not the updated copy, thus defeating the purpose of the function.

Signed-off-by: Francesco Romani <fromani@redhat.com>
Co-authored-by: Francesco Romani <fromani@redhat.com>
  • Loading branch information
openshift-cherrypick-robot and ffromani committed Sep 5, 2023
1 parent 126f79c commit a9aadb6
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -111,7 +111,7 @@ func UpdateWithRetry(profile *performancev2.PerformanceProfile) {
}

updatedProfile.Spec = *profile.Spec.DeepCopy()
if err := testclient.Client.Update(context.TODO(), profile); err != nil {
if err := testclient.Client.Update(context.TODO(), updatedProfile); err != nil {
if !errors.IsConflict(err) {
testlog.Errorf("failed to update the profile %q: %v", profile.Name, err)
}
Expand Down

0 comments on commit a9aadb6

Please sign in to comment.