Skip to content

Commit

Permalink
Added integration test veryfing the field in API
Browse files Browse the repository at this point in the history
  • Loading branch information
druminski committed Jul 2, 2024
1 parent 71299b2 commit d32afbb
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class IncomingPermissionsPathMatchingTest {
incoming:
unlistedEndpointsPolicy: blockAndLog
endpoints:
- paths: ["/api/products", "/api/products/*/reviews", "/api/offers**"]
clients: ["echo2"]
- path: "/path"
clients: ["echo2"]
- pathPrefix: "/prefix"
Expand Down Expand Up @@ -139,4 +141,12 @@ class IncomingPermissionsPathMatchingTest {
assertThat(it).isForbidden()
}
}

@Test
fun `echo should allow echo2 to access 'api' endpoints for matched Glob patterns in the 'paths' field`() {
// expect
echo2Envoy.egressOperations.callService(service = "echo", pathAndQuery = "/api/products").also {
assertThat(it).isOk()
}
}
}

0 comments on commit d32afbb

Please sign in to comment.