Unify test resource builders #1224
Labels
area/api-gateway
Issues or PRs related to api-gateway
kind/feature
Categorizes issue or PR as related to a new feature.
Description
While implementing v2alpha1 processors, new builders for test resources were introduced. Those builders were duplicated in packages for Virtual Service, Authorization Policy, Request Authentication processors and gateway v2alpha1 package.
Part of this builders are functions that create a new builder with default data, for example VirtualService newAPIRuleBuilderWithDummyData and Authorization Policy newAPIRuleBuilderWithDummyData.
The goal is to have only one builder implementation per resource and use this builder in the tests in all packages. Each package should define its own functions for default data that are implemented in the specific package, so we don't mix those defaults in between packages.
Reasons
Remove duplicate test code.
DoD:
- [ ] Provide unit and integration tests.- [ ] Provide documentation.- [ ] Verify if the solution works for both open-source Kyma and SAP BTP, Kyma runtime.- [ ] If you changed the resource limits, explain why it was needed.- [ ] Verify that your contributions don't decrease code coverage. If they do, explain why this is the case.- [ ] Add release notes.Attachments
The text was updated successfully, but these errors were encountered: