DRA E2E: fix "cluster must manage ResourceSlices" test

Adding SharedCounters broke the test and wasn't detected in the presubmit
because the test is slow and didn't run.

We could add a "SharedCounters is empty" clause, but probably it is safer
to be less strict in the test and tolerate unknown fields. This will also
minimize the work which needs to be done in the v1beta2 PR.
This commit is contained in:
Patrick Ohly 2025-03-20 13:36:21 +01:00
parent 473533adaa
commit 2d05c3849a

View File

@ -1776,7 +1776,9 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation,
}),
),
}),
"Spec": gstruct.MatchAllFields(gstruct.Fields{
// Ignoring some fields, like SharedCounters, because we don't run this test
// for PRs (it's slow) and don't want CI breaks when fields get added or renamed.
"Spec": gstruct.MatchFields(gstruct.IgnoreExtras, gstruct.Fields{
"Driver": gomega.Equal(driver.Name),
"NodeName": gomega.Equal(nodeName),
"NodeSelector": gomega.BeNil(),