api icon indicating copy to clipboard operation
api copied to clipboard

Make successful non-defaulting onCreate integration tests less verbose

Open mdbooth opened this issue 4 months ago • 1 comments

We have a great deal of onCreate tests which expect the object to be created exactly as specified without modification. We currently require these tests to specify identical values for initial and expected. In the common case where they are identical, this makes the tests more error-prone to write and validate visually. It would be simpler if it were permitted to omit one of these values if it should be identical to the other.

I recommend that we allow expected to be omitted. If omitted, we default it to the value of initial.

Similarly for onUpdate tests, we could default the value of expected to the value of updated.

mdbooth avatar Oct 16 '25 12:10 mdbooth

https://github.com/openshift/api/pull/2541#issuecomment-3432923941

Per comment on the implementation, we would like to keep the expected as an explicit test option and not default it for now

JoelSpeed avatar Oct 22 '25 15:10 JoelSpeed

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar Jan 21 '26 01:01 openshift-bot