diff --git a/ordinis-app/src/test/java/cloud/nstart/terravault/ordinis/app/e2e/SmokeE2ETest.java b/ordinis-app/src/test/java/cloud/nstart/terravault/ordinis/app/e2e/SmokeE2ETest.java index 4669ce8..b5c5ab7 100644 --- a/ordinis-app/src/test/java/cloud/nstart/terravault/ordinis/app/e2e/SmokeE2ETest.java +++ b/ordinis-app/src/test/java/cloud/nstart/terravault/ordinis/app/e2e/SmokeE2ETest.java @@ -141,8 +141,9 @@ class SmokeE2ETest { * debugging без traceId correlation. * * - *
Покрывает оба пути: путь похожий на API ({@code /api/v1/notexist}) и - * generic non-API ({@code /random/path}). + *
Тест проверяет API-typo путь — он независим от env (springdoc может + * быть enabled/disabled, не влияет). Проверка swagger-ui→404 при disabled + * springdoc относится к prod integration, не к unit-уровню handler'а. */ @Test void unknownPath_returns404WithNotFoundCode() throws Exception { @@ -151,7 +152,9 @@ class SmokeE2ETest { .andExpect(jsonPath("$.status").value(404)) .andExpect(jsonPath("$.code").value("not_found")); - mvc.perform(get("/swagger-ui/index.html")) + // Generic non-API typo тоже должен 404'нуться (covers static resource + // fallback branch NoResourceFoundException — этот путь не SPA-routed). + mvc.perform(get("/totally-bogus-path-xyz-12345.unknown")) .andExpect(status().isNotFound()) .andExpect(jsonPath("$.status").value(404)) .andExpect(jsonPath("$.code").value("not_found"));