Skip to content

Commit

Permalink
Merge pull request #527 from jsmolar/observability
Browse files Browse the repository at this point in the history
Fix preexisting auth
  • Loading branch information
jsmolar committed Sep 9, 2024
2 parents 522b264 + a0af1cb commit e12cfad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ def _route(hostname, gateway):


@pytest.fixture(scope="module")
def setup_authorization(request, blame, cluster, label): # pylint: disable=unused-argument
def setup_authorization(request, blame, cluster, module_label): # pylint: disable=unused-argument
"""Factory method for creating AuthConfigs in the test run"""

def _authorization(route, sharding_label=None):
auth = AuthConfig.create_instance(
cluster,
blame("ac"),
route,
labels={"testRun": label, "sharding": sharding_label},
labels={"testRun": module_label, "sharding": sharding_label},
)
auth.responses.add_success_header("header", JsonResponse({"anything": Value(sharding_label)}))
request.addfinalizer(auth.delete)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@


@pytest.fixture(scope="module")
def setup_authorino(cluster, blame, testconfig, label, request):
def setup_authorino(cluster, blame, testconfig, module_label, request):
"""Authorino instance"""

def _authorino(sharding_label):
authorino = AuthorinoCR.create_instance(
cluster,
blame("authorino"),
image=weakget(testconfig)["authorino"]["image"] % None,
label_selectors=[f"sharding={sharding_label}", f"testRun={label}"],
label_selectors=[f"sharding={sharding_label}", f"testRun={module_label}"],
)
request.addfinalizer(authorino.delete)
authorino.commit()
Expand Down Expand Up @@ -59,7 +59,6 @@ def test_preexisting_auth(
route2 = setup_route(hostname.hostname, gw2)
auth = setup_authorization(route2, "B")
auth.wait_for_ready()
auth.refresh()

assert (
hostname.hostname in auth.model.status.summary.hostsReady
Expand Down

0 comments on commit e12cfad

Please sign in to comment.