Skip to content

Commit

Permalink
Functional test dbpurge job
Browse files Browse the repository at this point in the history
Nova operator's dbpurge job should assigned a node

Closes #OSPRH-10765
  • Loading branch information
auniyal61 authored and openshift-merge-bot[bot] committed Nov 27, 2024
1 parent 42b7b84 commit dfc4cc1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/functional/novaconductor_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ var _ = Describe("NovaConductor controller", func() {
k8sClient.Delete, ctx, CreateDefaultCellInternalSecret(cell0))

spec := GetDefaultNovaConductorSpec(cell0)
newSelector := map[string]string{"foo": "bar"}
spec["nodeSelector"] = &newSelector
DeferCleanup(th.DeleteInstance, CreateNovaConductor(cell0.ConductorName, spec))

th.ExpectCondition(
Expand Down Expand Up @@ -376,6 +378,11 @@ var _ = Describe("NovaConductor controller", func() {
Equal(fmt.Sprintf("%d", *conductor.Spec.DBPurge.ArchiveAge)))
Expect(GetEnvVarValue(jobEnv, "PURGE_AGE", "")).To(
Equal(fmt.Sprintf("%d", *conductor.Spec.DBPurge.PurgeAge)))
service := cron.Spec.JobTemplate.Labels["service"]
Expect(service).To(Equal("nova-conductor"))
nodeSelector := cron.Spec.JobTemplate.Spec.Template.Spec.NodeSelector
Expect(nodeSelector).NotTo(BeNil())
Expect(nodeSelector).To(Equal(map[string]string{"foo": "bar"}))

th.ExpectCondition(
cell0.ConductorName,
Expand Down

0 comments on commit dfc4cc1

Please sign in to comment.