From 70d5315fefdb083ed3e2c3d1b6201dede3ffe0dc Mon Sep 17 00:00:00 2001 From: Lukasz Druminski Date: Fri, 19 Jul 2024 12:33:14 +0200 Subject: [PATCH] Testing Glob patterns in incoming permissions configuration --- .../permissions/IncomingPermissionsPathMatchingTest.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/permissions/IncomingPermissionsPathMatchingTest.kt b/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/permissions/IncomingPermissionsPathMatchingTest.kt index aa520b42e..aac292271 100644 --- a/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/permissions/IncomingPermissionsPathMatchingTest.kt +++ b/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/permissions/IncomingPermissionsPathMatchingTest.kt @@ -33,6 +33,8 @@ class IncomingPermissionsPathMatchingTest { - /api/**/description - /*/login - /**/health + - /path/*.js + - /path2/*.html clients: ["echo2"] - path: "/path" clients: ["echo2"] @@ -172,6 +174,12 @@ class IncomingPermissionsPathMatchingTest { echo2Envoy.egressOperations.callService(service = "echo", pathAndQuery = "/api/login").also { assertThat(it).isOk() } + echo2Envoy.egressOperations.callService(service = "echo", pathAndQuery = "/path/path1").also { + assertThat(it).isOk() + } + echo2Envoy.egressOperations.callService(service = "echo", pathAndQuery = "/path/path2").also { + assertThat(it).isOk() + } echo2Envoy.egressOperations.callService(service = "echo", pathAndQuery = "/api/products/too/many/reviews").also { assertThat(it).isForbidden() }