Skip to content

Commit eac834e

Browse files
committed
test: add prefixed path cases for health probe skip tests
Cover the root_path scenario where probe paths become /api/lightspeed/readiness and /api/lightspeed/liveness. Signed-off-by: Major Hayden <major@redhat.com>
1 parent 248a8a5 commit eac834e

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

tests/unit/authentication/test_rh_identity.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,15 @@ def _mock_configuration(
467467
mocker.patch("authentication.rh_identity.configuration", mock_config)
468468

469469
@pytest.mark.asyncio
470-
@pytest.mark.parametrize("path", ["/readiness", "/liveness"])
470+
@pytest.mark.parametrize(
471+
"path",
472+
[
473+
"/readiness",
474+
"/liveness",
475+
"/api/lightspeed/readiness",
476+
"/api/lightspeed/liveness",
477+
],
478+
)
471479
async def test_probe_paths_skip_auth_when_enabled(
472480
self, mocker: MockerFixture, path: str
473481
) -> None:
@@ -481,7 +489,15 @@ async def test_probe_paths_skip_auth_when_enabled(
481489
assert result == NO_AUTH_TUPLE
482490

483491
@pytest.mark.asyncio
484-
@pytest.mark.parametrize("path", ["/readiness", "/liveness"])
492+
@pytest.mark.parametrize(
493+
"path",
494+
[
495+
"/readiness",
496+
"/liveness",
497+
"/api/lightspeed/readiness",
498+
"/api/lightspeed/liveness",
499+
],
500+
)
485501
async def test_probe_paths_require_auth_when_disabled(
486502
self, mocker: MockerFixture, path: str
487503
) -> None:

0 commit comments

Comments
 (0)