Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify test resource builders #1224

Open
triffer opened this issue Aug 6, 2024 · 0 comments
Open

Unify test resource builders #1224

triffer opened this issue Aug 6, 2024 · 0 comments
Labels
area/api-gateway Issues or PRs related to api-gateway kind/feature Categorizes issue or PR as related to a new feature.

Comments

@triffer
Copy link
Contributor

triffer commented Aug 6, 2024

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

@triffer triffer added kind/feature Categorizes issue or PR as related to a new feature. area/api-gateway Issues or PRs related to api-gateway labels Aug 6, 2024
@triffer triffer mentioned this issue Sep 5, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api-gateway Issues or PRs related to api-gateway kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant