@@ -2756,7 +2756,7 @@ func getCondition(job *batch.Job, condition batch.JobConditionType, status v1.Co
2756
2756
// reaching the active deadline, at which point it is marked as Failed.
2757
2757
func TestPastDeadlineJobFinished (t * testing.T ) {
2758
2758
_ , ctx := ktesting .NewTestContext (t )
2759
- clientset := fake .NewSimpleClientset ()
2759
+ clientset := fake .NewClientset ()
2760
2760
fakeClock := clocktesting .NewFakeClock (time .Now ().Truncate (time .Second ))
2761
2761
manager , sharedInformerFactory := newControllerFromClientWithClock (ctx , t , clientset , controller .NoResyncPeriodFunc , fakeClock )
2762
2762
manager .podStoreSynced = alwaysReady
@@ -6044,7 +6044,7 @@ func TestGetPodsForJob(t *testing.T) {
6044
6044
if tc .jobDeleted {
6045
6045
job .DeletionTimestamp = & metav1.Time {}
6046
6046
}
6047
- clientSet := fake .NewSimpleClientset (job , otherJob )
6047
+ clientSet := fake .NewClientset (job , otherJob )
6048
6048
jm , informer := newControllerFromClient (ctx , t , clientSet , controller .NoResyncPeriodFunc )
6049
6049
jm .podStoreSynced = alwaysReady
6050
6050
jm .jobStoreSynced = alwaysReady
@@ -6416,7 +6416,7 @@ func TestSyncJobExpectations(t *testing.T) {
6416
6416
6417
6417
func TestWatchJobs (t * testing.T ) {
6418
6418
_ , ctx := ktesting .NewTestContext (t )
6419
- clientset := fake .NewSimpleClientset ()
6419
+ clientset := fake .NewClientset ()
6420
6420
fakeWatch := watch .NewFake ()
6421
6421
clientset .PrependWatchReactor ("jobs" , core .DefaultWatchReactor (fakeWatch , nil ))
6422
6422
manager , sharedInformerFactory := newControllerFromClient (ctx , t , clientset , controller .NoResyncPeriodFunc )
@@ -6461,7 +6461,7 @@ func TestWatchJobs(t *testing.T) {
6461
6461
func TestWatchPods (t * testing.T ) {
6462
6462
_ , ctx := ktesting .NewTestContext (t )
6463
6463
testJob := newJob (2 , 2 , 6 , batch .NonIndexedCompletion )
6464
- clientset := fake .NewSimpleClientset (testJob )
6464
+ clientset := fake .NewClientset (testJob )
6465
6465
fakeWatch := watch .NewFake ()
6466
6466
clientset .PrependWatchReactor ("pods" , core .DefaultWatchReactor (fakeWatch , nil ))
6467
6467
manager , sharedInformerFactory := newControllerFromClient (ctx , t , clientset , controller .NoResyncPeriodFunc )
@@ -6506,7 +6506,7 @@ func TestWatchPods(t *testing.T) {
6506
6506
6507
6507
func TestWatchOrphanPods (t * testing.T ) {
6508
6508
_ , ctx := ktesting .NewTestContext (t )
6509
- clientset := fake .NewSimpleClientset ()
6509
+ clientset := fake .NewClientset ()
6510
6510
sharedInformers := informers .NewSharedInformerFactory (clientset , controller .NoResyncPeriodFunc ())
6511
6511
manager , err := NewController (ctx , sharedInformers .Core ().V1 ().Pods (), sharedInformers .Batch ().V1 ().Jobs (), clientset )
6512
6512
if err != nil {
@@ -6577,7 +6577,7 @@ func TestWatchOrphanPods(t *testing.T) {
6577
6577
6578
6578
func TestSyncOrphanPod (t * testing.T ) {
6579
6579
_ , ctx := ktesting .NewTestContext (t )
6580
- clientset := fake .NewSimpleClientset ()
6580
+ clientset := fake .NewClientset ()
6581
6581
sharedInformers := informers .NewSharedInformerFactory (clientset , controller .NoResyncPeriodFunc ())
6582
6582
manager , err := NewController (ctx , sharedInformers .Core ().V1 ().Pods (), sharedInformers .Batch ().V1 ().Jobs (), clientset )
6583
6583
if err != nil {
@@ -7455,7 +7455,7 @@ func TestEnsureJobConditions(t *testing.T) {
7455
7455
7456
7456
func TestFinalizersRemovedExpectations (t * testing.T ) {
7457
7457
_ , ctx := ktesting .NewTestContext (t )
7458
- clientset := fake .NewSimpleClientset ()
7458
+ clientset := fake .NewClientset ()
7459
7459
sharedInformers := informers .NewSharedInformerFactory (clientset , controller .NoResyncPeriodFunc ())
7460
7460
manager , err := NewController (ctx , sharedInformers .Core ().V1 ().Pods (), sharedInformers .Batch ().V1 ().Jobs (), clientset )
7461
7461
if err != nil {
@@ -7559,7 +7559,7 @@ func TestFinalizerCleanup(t *testing.T) {
7559
7559
ctx , cancel := context .WithCancel (ctx )
7560
7560
defer cancel ()
7561
7561
7562
- clientset := fake .NewSimpleClientset ()
7562
+ clientset := fake .NewClientset ()
7563
7563
sharedInformers := informers .NewSharedInformerFactory (clientset , controller .NoResyncPeriodFunc ())
7564
7564
manager , err := NewController (ctx , sharedInformers .Core ().V1 ().Pods (), sharedInformers .Batch ().V1 ().Jobs (), clientset )
7565
7565
if err != nil {
0 commit comments