fix(test): route SecurityFilterIT protected-endpoint check to env-scoped URL
The agent list moved from /api/v1/agents to /api/v1/environments/{envSlug}/agents;
the 'valid JWT returns 200' test was hitting the retired flat path and
getting 404. The other 'without JWT' cases still pass because Spring
Security rejects them at the filter chain before URL routing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -51,8 +51,9 @@ class SecurityFilterIT extends AbstractPostgresIT {
|
||||
|
||||
@Test
|
||||
void protectedEndpoint_withValidJwt_returns200() {
|
||||
// Agent list moved from flat /api/v1/agents to env-scoped path.
|
||||
ResponseEntity<String> response = restTemplate.exchange(
|
||||
"/api/v1/agents",
|
||||
"/api/v1/environments/default/agents",
|
||||
HttpMethod.GET,
|
||||
new HttpEntity<>(securityHelper.authHeadersNoBody(viewerJwt)),
|
||||
String.class);
|
||||
|
||||
Reference in New Issue
Block a user