stackabletech / operator-rs

A simple wrapper/framework around kube-rs to make implementing Operators/Controllers easier
Apache License 2.0
116 stars 12 forks source link

Code using `ObjectMetaBuilder::ownerreference_from_resource()` is not unit testable #740

Open razvan opened 6 months ago

razvan commented 6 months ago

Description

Currently it's impossible to write unit tests for code that calls ObjectMetaBuilder::ownerreference_from_resource(). This is because OwnerReferenceBuilder::build() checks for the uid key which is cannot be set in tests.

Unfortunately this affects pretty much all operator code.