-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add section targeting tests for ratelimit policy #634
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: averevki <[email protected]>
f96cd8e
to
05da8e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the tescases from deleted limitador/route/...
module preserved or they are no longer relevant?
@pytest.fixture(scope="module") | ||
def rate_limit(cluster, blame, module_label, gateway): | ||
"""Add a RateLimitPolicy targeting the specific Gateway Listener""" | ||
rlp = RateLimitPolicy.create_instance(cluster, blame("limit"), gateway, "api", labels={"testRun": module_label}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use GatewayListener.name
if referencing the default name for listener api
def rate_limit(cluster, blame, module_label, route): | ||
"""Add a RateLimitPolicy targeting the first HTTPRoute Rule""" | ||
rate_limit = RateLimitPolicy.create_instance( | ||
cluster, blame("limit"), route, "rule-1", labels={"testRun": module_label} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does the route
know about rule-1
and rule-2
section names?
Refined #600 PR from @martinhesko
Closes #561