Skip to content

Commit

Permalink
unit test case for priorityClass
Browse files Browse the repository at this point in the history
  • Loading branch information
swapnilpotnis committed Mar 4, 2022
1 parent f6ee0dd commit c4aa417
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/cronjob/es_index_cleaner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,14 @@ func TestCustomEsIndexCleanerImage(t *testing.T) {
assert.Empty(t, jaeger.Spec.Storage.EsIndexCleaner.Image)
assert.Equal(t, "org/custom-es-index-cleaner-image:"+version.Get().Jaeger, cjob.Spec.JobTemplate.Spec.Template.Spec.Containers[0].Image)
}

func TestPriorityClassName(t *testing.T) {
jaeger := v1.NewJaeger(types.NamespacedName{Name: "TestPriorityClassName"})

priorityClassName_val := "true"

cjob := CreateEsIndexCleaner(jaeger)
cjob.Spec.JobTemplate.Spec.Template.Spec.PriorityClassName = priorityClassName_val

assert.Equal(t, priorityClassName_val, cjob.Spec.JobTemplate.Spec.Template.Spec.PriorityClassName)
}

0 comments on commit c4aa417

Please sign in to comment.