Skip to content

Commit

Permalink
use wrapped fake client in failing test
Browse files Browse the repository at this point in the history
Signed-off-by: Avinash Patnala <[email protected]>
  • Loading branch information
Avinash Patnala committed Sep 19, 2024
1 parent 2ac1e80 commit c9df2a9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/readiness/ready_tracker_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,10 @@ func mustInitializeScheme(scheme *runtime.Scheme) *runtime.Scheme {
// Verify that TryCancelTemplate functions the same as regular CancelTemplate if readinessRetries is set to 0.
func Test_ReadyTracker_TryCancelTemplate_No_Retries(t *testing.T) {
lister := fake.NewClientBuilder().WithScheme(mustInitializeScheme(runtime.NewScheme())).WithRuntimeObjects(convertedTemplate.DeepCopyObject()).Build()
rt := newTracker(lister, false, false, false, false, nil, func() objData {
return objData{retries: 0}
wrapLister := WrapFakeClientWithMutex{fakeLister: lister}

rt := newTracker(&wrapLister, false, false, false, false, nil, func() objData {
return objData{retries: 2}
})

// Run kicks off all the tracking
Expand Down

0 comments on commit c9df2a9

Please sign in to comment.