From 933ff17d272d9ee353e70f32cef25a761a792e81 Mon Sep 17 00:00:00 2001 From: Ivan_Kustau Date: Mon, 28 Aug 2023 13:16:18 +0300 Subject: [PATCH] Fix tests --- build.gradle | 4 ++-- .../commons/exception/rest/StatusCodeMapping.java | 1 + .../reportportal/ws/exception/rest/ExceptionHandlingTest.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 5f6141f..c45f22c 100644 --- a/build.gradle +++ b/build.gradle @@ -42,7 +42,7 @@ repositories { dependencyManagement { imports { mavenBom 'org.springframework.boot:spring-boot-dependencies:2.1.5.RELEASE' - mavenBom(releaseMode ? 'com.epam.reportportal:commons-bom:' + getProperty('bom.version') : 'com.github.reportportal:commons-bom:7affe20') + mavenBom(releaseMode ? 'com.epam.reportportal:commons-bom:' + getProperty('bom.version') : 'com.github.reportportal:commons-bom:6aa55fc0') } } @@ -50,7 +50,7 @@ dependencies { if (releaseMode) { compile 'com.epam.reportportal:commons-model' } else { - compile 'com.github.reportportal:commons-model:22ccaac' + compile 'com.github.reportportal:commons-model:232e69a5' } compile 'org.slf4j:slf4j-api' diff --git a/src/main/java/com/epam/ta/reportportal/commons/exception/rest/StatusCodeMapping.java b/src/main/java/com/epam/ta/reportportal/commons/exception/rest/StatusCodeMapping.java index a147125..8708a97 100644 --- a/src/main/java/com/epam/ta/reportportal/commons/exception/rest/StatusCodeMapping.java +++ b/src/main/java/com/epam/ta/reportportal/commons/exception/rest/StatusCodeMapping.java @@ -61,6 +61,7 @@ private StatusCodeMapping() { put(ErrorType.ANALYZER_NOT_FOUND, HttpStatus.NOT_FOUND); put(ErrorType.ATTACHMENT_NOT_FOUND, HttpStatus.NOT_FOUND); put(ErrorType.UNABLE_TO_LOAD_BINARY_DATA, HttpStatus.NOT_FOUND); + put(ErrorType.CLUSTER_NOT_FOUND, HttpStatus.NOT_FOUND); put(ErrorType.RESOURCE_ALREADY_EXISTS, HttpStatus.CONFLICT); put(ErrorType.PROJECT_ALREADY_EXISTS, HttpStatus.CONFLICT); diff --git a/src/test/java/com/epam/ta/reportportal/ws/exception/rest/ExceptionHandlingTest.java b/src/test/java/com/epam/ta/reportportal/ws/exception/rest/ExceptionHandlingTest.java index d26e5d4..a459cc1 100644 --- a/src/test/java/com/epam/ta/reportportal/ws/exception/rest/ExceptionHandlingTest.java +++ b/src/test/java/com/epam/ta/reportportal/ws/exception/rest/ExceptionHandlingTest.java @@ -72,7 +72,7 @@ public static List getParameters() { { new HttpMessageNotReadableException(EXCEPTION_MESSAGE), ErrorType.INCORRECT_REQUEST, HttpStatus.BAD_REQUEST, EXCEPTION_MESSAGE }, { new MissingServletRequestParameterException("test", "test"), ErrorType.INCORRECT_REQUEST, HttpStatus.BAD_REQUEST, - "Required test parameter 'test' is not present" } }); + "Incorrect Request. Required request parameter 'test' for method parameter type test is not present" } }); } @Test