From ee412f8f2d795cefe08c05cdf3d3a06572776095 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Mon, 6 May 2024 13:42:32 +0200 Subject: [PATCH] SONAR-22035 Fix json returned by api/v2/analysis/engine --- .../server/v2/api/analysis/response/EngineInfoRestResponse.java | 2 +- .../analysis/controller/DefaultScannerEngineControllerTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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( -- 2.39.5