This is a kludge because extraction of segregated interface for KubeObject is very difficult. This commit uses actual instance of KubeObject instead as a fake.
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
Key changes were:
- Introduction of dependencies as interfaces to permit stubbing in general (Dependency Inversion Principle)
- Introduction of segregated interfaces to only require stubbing of minimal stuff (Interface Segregation Principle)
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
Notice how interface is in fact segregated, i.e. it only advertises the minimal properties currently required.
With this we satisfy Interface Segregation Principle and thus permit e.g. minimal requirement for stubbing in future unit tests.
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
This was done in a naive way by disregarding stuff such as:
- Avoidance of shared global state (dependency inversion principle)
- Unit testing
- Minimal implementation over defensive code (elvis, just in case)
- Full understanding for use cases of all different kube objects
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>