open-feature / open-feature-operator

A Kubernetes feature flag operator
https://openfeature.dev
Apache License 2.0
187 stars 36 forks source link

Create Unit tests for Controllers using K8s Fake Client #394

Closed bacherfl closed 1 year ago

bacherfl commented 1 year ago

Short abstract

The goal of this issue is to add unit tests for the FeatureFlagConfiguration and FlagSourceConfiguration controllers, using the Kubernetes fake client.

Why

Adding these tests will help to better verify the behavior of the controllers, as opposed to the ginkgo component tests, since with this approach it's possible to check for certain assertions after each invocation of the controller's Reconcile method, and controlling the current state of the relevant resources with the fake kubernetes client.

Functional requirements

odubajDT commented 1 year ago

Hi, I would like to work on this please :)

toddbaert commented 1 year ago

@odubajDT assigned!