mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-12 05:21:58 +00:00
revert changes to TestMetricsOnSuccesses for job pods creation total metric
This commit is contained in:
parent
88c0a8be1b
commit
9e2821d585
@ -82,7 +82,6 @@ func TestMetricsOnSuccesses(t *testing.T) {
|
||||
job *batchv1.Job
|
||||
wantJobFinishedNumMetric metricLabelsWithValue
|
||||
wantJobPodsFinishedMetric metricLabelsWithValue
|
||||
wantJobPodsCreatedMetric metricLabelsWithValue
|
||||
}{
|
||||
"non-indexed job": {
|
||||
job: &batchv1.Job{
|
||||
@ -100,10 +99,6 @@ func TestMetricsOnSuccesses(t *testing.T) {
|
||||
Labels: []string{"NonIndexed", "succeeded"},
|
||||
Value: 2,
|
||||
},
|
||||
wantJobPodsCreatedMetric: metricLabelsWithValue{
|
||||
Labels: []string{"new", "succeeded"},
|
||||
Value: 2,
|
||||
},
|
||||
},
|
||||
"indexed job": {
|
||||
job: &batchv1.Job{
|
||||
@ -121,10 +116,6 @@ func TestMetricsOnSuccesses(t *testing.T) {
|
||||
Labels: []string{"Indexed", "succeeded"},
|
||||
Value: 2,
|
||||
},
|
||||
wantJobPodsCreatedMetric: metricLabelsWithValue{
|
||||
Labels: []string{"new", "succeeded"},
|
||||
Value: 2,
|
||||
},
|
||||
},
|
||||
}
|
||||
job_index := 0 // job index to avoid collisions between job names created by different test cases
|
||||
@ -151,7 +142,6 @@ func TestMetricsOnSuccesses(t *testing.T) {
|
||||
// verify metric values after the job is finished
|
||||
validateCounterMetric(ctx, t, metrics.JobFinishedNum, tc.wantJobFinishedNumMetric)
|
||||
validateCounterMetric(ctx, t, metrics.JobPodsFinished, tc.wantJobPodsFinishedMetric)
|
||||
validateCounterMetric(ctx, t, metrics.JobPodsCreationTotal, tc.wantJobPodsCreatedMetric)
|
||||
validateTerminatedPodsTrackingFinalizerMetric(ctx, t, int(*jobObj.Spec.Parallelism))
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user