]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-22035 Fix json returned by api/v2/analysis/engine
authorJulien HENRY <julien.henry@sonarsource.com>
Mon, 6 May 2024 11:42:32 +0000 (13:42 +0200)
committersonartech <sonartech@sonarsource.com>
Mon, 6 May 2024 20:02:40 +0000 (20:02 +0000)
server/sonar-webserver-webapi-v2/src/main/java/org/sonar/server/v2/api/analysis/response/EngineInfoRestResponse.java
server/sonar-webserver-webapi-v2/src/test/java/org/sonar/server/v2/api/analysis/controller/DefaultScannerEngineControllerTest.java

index 10b799dcc43b8f54d1c348534742ab57a4fc339b..8a88a32756e68292ad5887ba40f3168f2af09a07 100644 (file)
@@ -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) {
 }
index dc4d2818194a8bad77a0dd64cf271694a7383a97..f331406ba0ea1fda59ed81bde580512682cbf44a 100644 (file)
@@ -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(