wave
wave copied to clipboard
Refactor, Cleanup Code and use Generics
- Refactored handler to use generics instead of "podController" wrapper type
- Deduplicated Getter Types
- Deduplicated Controller logic and entrypoints
- Deduplicated Webhook entrypoints
- Deduplicated Controller Tests (using generics)
- Tests are now exactly the same for all three objects (there were slightly diverged before)
- Deduplicated podTemplate in Test Data
Overall we lost about 1.2k lines of code. Also extending/maintaining controllers and controller tests became easier. Before you basically had to make the same change in three files each. That is now in one place. Only downside is that you have to deal with generic types in tests now.
I will resolve the conflict. I also found why my tests for #167 failed. I will improve the test setup to make those easier to add.