@@ -118,7 +118,7 @@ func validateTerminatedPodsTrackingFinalizerMetric(ctx context.Context, t *testi
118
118
// Note: this scenario requires the use of finalizers. Without finalizers there is no guarantee a failed pod would be
119
119
// checked against the pod failure policy rules before its removal by PodGC.
120
120
func TestJobPodFailurePolicyWithFailedPodDeletedDuringControllerRestart (t * testing.T ) {
121
- count := 3
121
+ count := int32 ( 3 )
122
122
job := batchv1.Job {
123
123
Spec : batchv1.JobSpec {
124
124
Template : v1.PodTemplateSpec {
@@ -133,8 +133,8 @@ func TestJobPodFailurePolicyWithFailedPodDeletedDuringControllerRestart(t *testi
133
133
},
134
134
},
135
135
},
136
- Parallelism : ptr . To ( int32 ( count )) ,
137
- Completions : ptr . To ( int32 ( count )) ,
136
+ Parallelism : & count ,
137
+ Completions : & count ,
138
138
PodFailurePolicy : & batchv1.PodFailurePolicy {
139
139
Rules : []batchv1.PodFailurePolicyRule {
140
140
{
@@ -181,7 +181,7 @@ func TestJobPodFailurePolicyWithFailedPodDeletedDuringControllerRestart(t *testi
181
181
t .Fatalf ("Failed to create Job: %v" , err )
182
182
}
183
183
validateJobPodsStatus (ctx , t , cs , jobObj , podsByStatus {
184
- Active : count ,
184
+ Active : int ( count ) ,
185
185
Ready : ptr.To [int32 ](0 ),
186
186
Terminating : ptr.To [int32 ](0 ),
187
187
})
@@ -541,7 +541,7 @@ func TestSuccessPolicy(t *testing.T) {
541
541
wantFailed : 0 ,
542
542
wantSucceeded : 1 ,
543
543
wantCompletedIndexes : "0" ,
544
- wantTerminating : ptr .To ( int32 ( 0 ) ),
544
+ wantTerminating : ptr.To [ int32 ]( 0 ),
545
545
},
546
546
},
547
547
wantConditionTypes : []batchv1.JobConditionType {batchv1 .JobSuccessCriteriaMet , batchv1 .JobComplete },
@@ -576,7 +576,7 @@ func TestSuccessPolicy(t *testing.T) {
576
576
wantFailed : 0 ,
577
577
wantSucceeded : 1 ,
578
578
wantCompletedIndexes : "0" ,
579
- wantTerminating : ptr .To ( int32 ( 0 ) ),
579
+ wantTerminating : ptr.To [ int32 ]( 0 ),
580
580
},
581
581
},
582
582
wantConditionTypes : []batchv1.JobConditionType {batchv1 .JobComplete },
@@ -643,7 +643,7 @@ func TestSuccessPolicy(t *testing.T) {
643
643
wantActiveIndexes : sets .New (0 , 1 ),
644
644
wantFailed : 0 ,
645
645
wantSucceeded : 0 ,
646
- wantTerminating : ptr .To ( int32 ( 0 ) ),
646
+ wantTerminating : ptr.To [ int32 ]( 0 ),
647
647
},
648
648
{
649
649
index : 1 ,
@@ -654,7 +654,7 @@ func TestSuccessPolicy(t *testing.T) {
654
654
wantFailed : 0 ,
655
655
wantSucceeded : 1 ,
656
656
wantCompletedIndexes : "1" ,
657
- wantTerminating : ptr .To ( int32 ( 1 ) ),
657
+ wantTerminating : ptr.To [ int32 ]( 1 ),
658
658
},
659
659
},
660
660
wantConditionTypes : []batchv1.JobConditionType {batchv1 .JobSuccessCriteriaMet , batchv1 .JobComplete },
@@ -690,7 +690,7 @@ func TestSuccessPolicy(t *testing.T) {
690
690
wantActiveIndexes : sets .New (0 , 1 ),
691
691
wantFailed : 0 ,
692
692
wantSucceeded : 0 ,
693
- wantTerminating : ptr .To ( int32 ( 0 ) ),
693
+ wantTerminating : ptr.To [ int32 ]( 0 ),
694
694
},
695
695
{
696
696
index : 1 ,
@@ -701,7 +701,7 @@ func TestSuccessPolicy(t *testing.T) {
701
701
wantFailed : 0 ,
702
702
wantSucceeded : 1 ,
703
703
wantCompletedIndexes : "1" ,
704
- wantTerminating : ptr .To ( int32 ( 1 ) ),
704
+ wantTerminating : ptr.To [ int32 ]( 1 ),
705
705
},
706
706
},
707
707
wantConditionTypes : []batchv1.JobConditionType {batchv1 .JobSuccessCriteriaMet , batchv1 .JobComplete },
@@ -740,7 +740,7 @@ func TestSuccessPolicy(t *testing.T) {
740
740
wantFailed : 1 ,
741
741
wantFailedIndexes : ptr .To ("0" ),
742
742
wantSucceeded : 0 ,
743
- wantTerminating : ptr .To ( int32 ( 0 ) ),
743
+ wantTerminating : ptr.To [ int32 ]( 0 ),
744
744
},
745
745
{
746
746
index : 1 ,
@@ -752,7 +752,7 @@ func TestSuccessPolicy(t *testing.T) {
752
752
wantSucceeded : 1 ,
753
753
wantFailedIndexes : ptr .To ("0" ),
754
754
wantCompletedIndexes : "1" ,
755
- wantTerminating : ptr .To ( int32 ( 0 ) ),
755
+ wantTerminating : ptr.To [ int32 ]( 0 ),
756
756
},
757
757
},
758
758
wantConditionTypes : []batchv1.JobConditionType {batchv1 .JobFailed },
@@ -1611,7 +1611,7 @@ func TestBackoffLimitPerIndex(t *testing.T) {
1611
1611
wantActiveIndexes : sets .New (0 , 1 ),
1612
1612
wantFailedIndexes : ptr .To ("" ),
1613
1613
wantReplacementPodFailureCount : ptr .To (1 ),
1614
- wantTerminating : ptr .To ( int32 ( 0 ) ),
1614
+ wantTerminating : ptr.To [ int32 ]( 0 ),
1615
1615
},
1616
1616
},
1617
1617
wantJobConditionType : batchv1 .JobComplete ,
@@ -1642,7 +1642,7 @@ func TestBackoffLimitPerIndex(t *testing.T) {
1642
1642
wantActiveIndexes : sets .New (0 , 1 ),
1643
1643
wantFailedIndexes : ptr .To ("" ),
1644
1644
wantReplacementPodFailureCount : ptr .To (1 ),
1645
- wantTerminating : ptr .To ( int32 ( 0 ) ),
1645
+ wantTerminating : ptr.To [ int32 ]( 0 ),
1646
1646
},
1647
1647
{
1648
1648
status : v1.PodStatus {
@@ -1653,7 +1653,7 @@ func TestBackoffLimitPerIndex(t *testing.T) {
1653
1653
wantActiveIndexes : sets .New (0 , 1 ),
1654
1654
wantFailedIndexes : ptr .To ("" ),
1655
1655
wantReplacementPodFailureCount : ptr .To (2 ),
1656
- wantTerminating : ptr .To ( int32 ( 0 ) ),
1656
+ wantTerminating : ptr.To [ int32 ]( 0 ),
1657
1657
},
1658
1658
{
1659
1659
status : v1.PodStatus {
@@ -1663,7 +1663,7 @@ func TestBackoffLimitPerIndex(t *testing.T) {
1663
1663
wantFailed : 3 ,
1664
1664
wantActiveIndexes : sets .New (1 ),
1665
1665
wantFailedIndexes : ptr .To ("0" ),
1666
- wantTerminating : ptr .To ( int32 ( 0 ) ),
1666
+ wantTerminating : ptr.To [ int32 ]( 0 ),
1667
1667
},
1668
1668
},
1669
1669
wantJobConditionType : batchv1 .JobFailed ,
@@ -1699,7 +1699,7 @@ func TestBackoffLimitPerIndex(t *testing.T) {
1699
1699
wantFailed : 1 ,
1700
1700
wantActiveIndexes : sets .New (0 , 1 , 2 ),
1701
1701
wantFailedIndexes : ptr .To ("" ),
1702
- wantTerminating : ptr .To ( int32 ( 0 ) ),
1702
+ wantTerminating : ptr.To [ int32 ]( 0 ),
1703
1703
},
1704
1704
{
1705
1705
index : 1 ,
@@ -1710,7 +1710,7 @@ func TestBackoffLimitPerIndex(t *testing.T) {
1710
1710
wantFailed : 2 ,
1711
1711
wantActiveIndexes : sets .New (0 , 1 , 2 ),
1712
1712
wantFailedIndexes : ptr .To ("" ),
1713
- wantTerminating : ptr .To ( int32 ( 0 ) ),
1713
+ wantTerminating : ptr.To [ int32 ]( 0 ),
1714
1714
},
1715
1715
{
1716
1716
index : 2 ,
@@ -1719,7 +1719,7 @@ func TestBackoffLimitPerIndex(t *testing.T) {
1719
1719
},
1720
1720
wantFailed : 5 ,
1721
1721
wantFailedIndexes : ptr .To ("" ),
1722
- wantTerminating : ptr .To ( int32 ( 2 ) ),
1722
+ wantTerminating : ptr.To [ int32 ]( 2 ),
1723
1723
},
1724
1724
},
1725
1725
wantJobConditionType : batchv1 .JobFailed ,
@@ -1754,7 +1754,7 @@ func TestBackoffLimitPerIndex(t *testing.T) {
1754
1754
wantFailed : 1 ,
1755
1755
wantActiveIndexes : sets .New (1 ),
1756
1756
wantFailedIndexes : ptr .To ("0" ),
1757
- wantTerminating : ptr .To ( int32 ( 0 ) ),
1757
+ wantTerminating : ptr.To [ int32 ]( 0 ),
1758
1758
},
1759
1759
{
1760
1760
index : 1 ,
@@ -1765,7 +1765,7 @@ func TestBackoffLimitPerIndex(t *testing.T) {
1765
1765
wantSucceeded : 1 ,
1766
1766
wantFailedIndexes : ptr .To ("0" ),
1767
1767
wantCompletedIndexes : "1" ,
1768
- wantTerminating : ptr .To ( int32 ( 0 ) ),
1768
+ wantTerminating : ptr.To [ int32 ]( 0 ),
1769
1769
},
1770
1770
},
1771
1771
wantJobConditionType : batchv1 .JobFailed ,
@@ -1801,7 +1801,7 @@ func TestBackoffLimitPerIndex(t *testing.T) {
1801
1801
wantFailed : 1 ,
1802
1802
wantActiveIndexes : sets .New (1 , 2 ),
1803
1803
wantFailedIndexes : ptr .To ("0" ),
1804
- wantTerminating : ptr .To ( int32 ( 0 ) ),
1804
+ wantTerminating : ptr.To [ int32 ]( 0 ),
1805
1805
},
1806
1806
{
1807
1807
index : 1 ,
@@ -1811,7 +1811,7 @@ func TestBackoffLimitPerIndex(t *testing.T) {
1811
1811
wantActive : 0 ,
1812
1812
wantFailed : 3 ,
1813
1813
wantFailedIndexes : ptr .To ("0,1" ),
1814
- wantTerminating : ptr .To ( int32 ( 1 ) ),
1814
+ wantTerminating : ptr.To [ int32 ]( 1 ),
1815
1815
},
1816
1816
},
1817
1817
wantJobConditionType : batchv1 .JobFailed ,
@@ -1871,7 +1871,7 @@ func TestBackoffLimitPerIndex(t *testing.T) {
1871
1871
wantFailed : 1 ,
1872
1872
wantActiveIndexes : sets .New (1 ),
1873
1873
wantFailedIndexes : ptr .To ("0" ),
1874
- wantTerminating : ptr .To ( int32 ( 0 ) ),
1874
+ wantTerminating : ptr.To [ int32 ]( 0 ),
1875
1875
},
1876
1876
{
1877
1877
index : 1 ,
@@ -1886,7 +1886,7 @@ func TestBackoffLimitPerIndex(t *testing.T) {
1886
1886
},
1887
1887
wantFailed : 2 ,
1888
1888
wantFailedIndexes : ptr .To ("0,1" ),
1889
- wantTerminating : ptr .To ( int32 ( 0 ) ),
1889
+ wantTerminating : ptr.To [ int32 ]( 0 ),
1890
1890
},
1891
1891
},
1892
1892
wantJobConditionType : batchv1 .JobFailed ,
0 commit comments