]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-22121 Move security reports pdf generation to its own library
authorDDMili <130993898+dejan-milisavljevic-sonarsource@users.noreply.github.com>
Wed, 8 May 2024 09:02:52 +0000 (11:02 +0200)
committersonartech <sonartech@sonarsource.com>
Wed, 8 May 2024 20:02:44 +0000 (20:02 +0000)
Co-authored-by: OrlovAlexander <35396155+OrlovAlexander85@users.noreply.github.com>
build.gradle
server/sonar-server-common/src/testFixtures/java/org/sonar/server/es/EsTester.java
settings.gradle

index 4b4050fa8b8e65410d336b04d3301114c67582de..6339a10c62c5435155befb0c845e34117d7bba8e 100644 (file)
@@ -450,6 +450,7 @@ subprojects {
       }
       dependency 'org.junit.platform:junit-platform-suite-api:1.10.2'
       dependency 'org.junit.platform:junit-platform-suite-engine:1.10.2'
+      dependency 'com.sonarsource.pdfreport:security-report-pdf-generation:1.0.0.98'
       dependency 'org.sonarsource.update-center:sonar-update-center-common:1.32.0.2441'
       dependency("org.springframework:spring-context:${springVersion}") {
         exclude 'commons-logging:commons-logging'
index 813f13aa96ec9a128d2db0169a6a6bcc6995de71..e507624ab2e08cad6cf0979d9a95357c56a3fdb3 100644 (file)
@@ -85,6 +85,8 @@ import org.elasticsearch.search.SearchHit;
 import org.elasticsearch.search.builder.SearchSourceBuilder;
 import org.elasticsearch.search.sort.SortOrder;
 import org.elasticsearch.transport.Netty4Plugin;
+import org.junit.jupiter.api.extension.AfterEachCallback;
+import org.junit.jupiter.api.extension.ExtensionContext;
 import org.junit.rules.ExternalResource;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -109,7 +111,7 @@ import static org.sonar.server.es.Index.ALL_INDICES;
 import static org.sonar.server.es.IndexType.FIELD_INDEX_TYPE;
 import static org.sonar.server.es.newindex.DefaultIndexSettings.REFRESH_IMMEDIATE;
 
-public class EsTester extends ExternalResource {
+public class EsTester extends ExternalResource implements AfterEachCallback {
 
   private static final int MIN_PORT = 1;
   private static final int MAX_PORT = 49151;
@@ -175,6 +177,11 @@ public class EsTester extends ExternalResource {
     create();
   }
 
+  @Override
+  public void afterEach(ExtensionContext extensionContext) throws Exception {
+    after();
+  }
+
   @Override
   protected void after() {
     if (isCustom) {
index 284b3f241d2f9636cdf470da39c352d42bb5d2f8..22d2fa50fdb320a73010ab4d7a70fb5a37bb5f54 100644 (file)
@@ -88,3 +88,4 @@ buildCache {
     enabled = !isCiServer
   }
 }
+