k8gb
k8gb copied to clipboard
REFACTORING: Use DepResover mock in constroller tests
Use DepResover mock instead of settings := provideSettings(t, predefinedConfig)
in constroller tests.
Using the settings object and calling reconcile is no longer sufficient. For example, the function works with k8gb.absa.oss_v1beta1_gslb_cr.yaml
from which it generates a gslb for the tests. Any change to this file will
cause the test to crash. We now have a depressolver mock (and a number of other mocks) that we can use for testing.
@kuritka what's the status of this one, can we close it?
Hi, not fully. Depresolver mock for tests is ready (#951), but controller tests would be refactored, to use this mock instead of direct instanptiating. Coverage requirement is still met but it's more about unify controller tests with mocks.