Skip to content

Commit 1562965

Browse files
committed
controller: test: verify RTE has a critical priority class
Following k8stopologyawareschedwg/deployer#360 which is part of deployer:v0.23.0, verify RTE DS priority as same as the expected one for schedule. Signed-off-by: Shereen Haj <[email protected]>
1 parent bd9c06c commit 1562965

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

internal/controller/numaresourcesoperator_controller_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import (
5555
"github.com/openshift-kni/numaresources-operator/pkg/hash"
5656
"github.com/openshift-kni/numaresources-operator/pkg/images"
5757
rtemetricsmanifests "github.com/openshift-kni/numaresources-operator/pkg/metrics/manifests/monitor"
58+
nrosched "github.com/openshift-kni/numaresources-operator/pkg/numaresourcesscheduler"
5859
"github.com/openshift-kni/numaresources-operator/pkg/objectnames"
5960
"github.com/openshift-kni/numaresources-operator/pkg/objectstate/rte"
6061
"github.com/openshift-kni/numaresources-operator/pkg/status"
@@ -282,6 +283,17 @@ var _ = Describe("Test NUMAResourcesOperator Reconcile", func() {
282283
Expect(nro.Status.NodeGroups[1].Config).To(Equal(conf), "default node group config for %q was not updated in the operator status", nro.Status.NodeGroups[1].PoolName)
283284
})
284285

286+
It("RTE ds should have the correct priority class", func() {
287+
dsKey := client.ObjectKey{
288+
Name: objectnames.GetComponentName(nro.Name, pn1),
289+
Namespace: testNamespace,
290+
}
291+
ds := &appsv1.DaemonSet{}
292+
Expect(reconciler.Client.Get(context.TODO(), dsKey, ds)).To(Succeed())
293+
294+
Expect(ds.Spec.Template.Spec.PriorityClassName).To(Equal(nrosched.SchedulerPriorityClassName))
295+
})
296+
285297
It("should update node group statuses with the updated configuration", func() {
286298
defaultConf := nropv1.DefaultNodeGroupConfig()
287299

0 commit comments

Comments
 (0)