From: Julien HENRY Date: Mon, 6 May 2024 11:42:32 +0000 (+0200) Subject: SONAR-22035 Fix json returned by api/v2/analysis/engine X-Git-Tag: 10.6.0.92116~143 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ee412f8f2d795cefe08c05cdf3d3a06572776095;p=sonarqube.git SONAR-22035 Fix json returned by api/v2/analysis/engine --- diff --git a/server/sonar-webserver-webapi-v2/src/main/java/org/sonar/server/v2/api/analysis/response/EngineInfoRestResponse.java b/server/sonar-webserver-webapi-v2/src/main/java/org/sonar/server/v2/api/analysis/response/EngineInfoRestResponse.java index 10b799dcc43..8a88a32756e 100644 --- a/server/sonar-webserver-webapi-v2/src/main/java/org/sonar/server/v2/api/analysis/response/EngineInfoRestResponse.java +++ b/server/sonar-webserver-webapi-v2/src/main/java/org/sonar/server/v2/api/analysis/response/EngineInfoRestResponse.java @@ -19,5 +19,5 @@ */ package org.sonar.server.v2.api.analysis.response; -public record EngineInfoRestResponse(String filename, String checksum) { +public record EngineInfoRestResponse(String filename, String sha256) { } diff --git a/server/sonar-webserver-webapi-v2/src/test/java/org/sonar/server/v2/api/analysis/controller/DefaultScannerEngineControllerTest.java b/server/sonar-webserver-webapi-v2/src/test/java/org/sonar/server/v2/api/analysis/controller/DefaultScannerEngineControllerTest.java index dc4d2818194..f331406ba0e 100644 --- a/server/sonar-webserver-webapi-v2/src/test/java/org/sonar/server/v2/api/analysis/controller/DefaultScannerEngineControllerTest.java +++ b/server/sonar-webserver-webapi-v2/src/test/java/org/sonar/server/v2/api/analysis/controller/DefaultScannerEngineControllerTest.java @@ -53,7 +53,7 @@ class DefaultScannerEngineControllerTest { String anyName = "anyName"; String anyChecksum = "anyChecksum"; when(scannerEngineHandler.getScannerEngineMetadata()).thenReturn(new ScannerEngineMetadata(anyName, anyChecksum)); - String expectedJson = format("{\"filename\":\"%s\",\"checksum\":\"%s\"}", anyName, anyChecksum); + String expectedJson = format("{\"filename\":\"%s\",\"sha256\":\"%s\"}", anyName, anyChecksum); mockMvc.perform(get(SCANNER_ENGINE_ENDPOINT)) .andExpectAll(