Skip to content

Commit

Permalink
Merge pull request #415 from pehala/fix_affected_by
Browse files Browse the repository at this point in the history
Add RateLimitPolicy to affected_by test
  • Loading branch information
averevki authored May 29, 2024
2 parents ce4f796 + 636b1f0 commit 4ca3a45
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,22 @@

import pytest

from testsuite.policy.rate_limit_policy import RateLimitPolicy, Limit

pytestmark = [pytest.mark.kuadrant_only]


@pytest.fixture(scope="module")
def rate_limit(openshift, blame, module_label, route):
"""
Rate limit object.
"""

policy = RateLimitPolicy.create_instance(openshift, blame("limit"), route, labels={"testRun": module_label})
policy.add_limit("basic", [Limit(5, 10)])
return policy


def test_route_status(route, rate_limit, authorization):
"""Tests affected by status for HTTPRoute"""
route.refresh()
Expand Down

0 comments on commit 4ca3a45

Please sign in to comment.