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

D&O merged policies / sectionName tests #608

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

martinhesko
Copy link
Contributor

Merge #600 first as the section_names commits are present in both

  • Added tests to cover merge strategy of Defaults & Overrides
  • Added tests to cover policies with Defaults & Overrides using SectionNames
  • @Boomatang added tests to check correct behavior of different orders of policy creation

martinhesko and others added 8 commits November 20, 2024 14:55
Allow adding strategy field to policies.

Signed-off-by: Jim Fitzpatrick <[email protected]>
Signed-off-by: Martin Hesko <[email protected]>
This adds test that make use of the merge strategy on defaults that are
targeting the same resource.

Signed-off-by: Jim Fitzpatrick <[email protected]>
This adds test that make use of the merge strategy on overrides that are
targeting the same resource.

Signed-off-by: Jim Fitzpatrick <[email protected]>
Add missing doc string to conftest.py

Signed-off-by: Jim Fitzpatrick <[email protected]>
CelPredicate("request.path == '/anything'"),
]
policy.overrides.add_limit("basic", [OVERRIDE_LIMIT], when=basic_when)
policy.overrides.add_limit("override", [OVERRIDE_LIMIT], when=override_when)
Copy link
Contributor Author

@martinhesko martinhesko Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Boomatang in this case there is functionally no difference between the two related tests, I would suggest reworking this with 2 normal limits and 1 override in this policy to apply the partial override in one case, similar to how it works in overrides/merge/test_gateway_override_merge.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants