aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2022-03-14 11:28:22 -0500
committersonartech <sonartech@sonarsource.com>2022-03-18 20:02:57 +0000
commitecf844b39473fe21acaa1f832d244a4cc4c9f811 (patch)
treea03e87cb743b877be05c92774e6f009bad3932f5 /sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol
parent1269984e8e09338c057d068d715ade7df5a0c354 (diff)
downloadsonarqube-ecf844b39473fe21acaa1f832d244a4cc4c9f811.tar.gz
sonarqube-ecf844b39473fe21acaa1f832d244a4cc4c9f811.zip
SONAR-16097 Add plugin cache to the Sensor API
Diffstat (limited to 'sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol')
-rw-r--r--sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java b/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java
index 58333d108cf..1269c63c540 100644
--- a/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java
+++ b/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java
@@ -35,7 +35,8 @@ import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.core.util.CloseableIterator;
import org.sonar.core.util.Protobuf;
-import org.sonar.scanner.protocol.internal.ScannerInternal.PluginCacheMsg;
+import org.sonar.scanner.protocol.internal.ScannerInternal;
+import org.sonar.scanner.protocol.internal.ScannerInternal.AnalysisCacheMsg;
import org.sonar.scanner.protocol.output.ScannerReport.Measure.StringValue;
import org.sonar.scanner.protocol.output.ScannerReport.SyntaxHighlightingRule.HighlightingType;
@@ -214,13 +215,13 @@ public class ScannerReportReaderTest {
@Test
public void read_plugin_cache() throws IOException {
ScannerReportWriter writer = new ScannerReportWriter(dir);
- writer.writePluginCache(PluginCacheMsg.newBuilder()
+ writer.writeAnalysisCache(ScannerInternal.AnalysisCacheMsg.newBuilder()
.putMap("key", ByteString.copyFrom("data", UTF_8))
.build());
ScannerReportReader reader = new ScannerReportReader(dir);
- PluginCacheMsg cache = Protobuf.read(new GZIPInputStream(reader.getPluginCache()), PluginCacheMsg.parser());
+ AnalysisCacheMsg cache = Protobuf.read(new GZIPInputStream(reader.getPluginCache()), ScannerInternal.AnalysisCacheMsg.parser());
assertThat(cache.getMapMap()).containsOnly(new AbstractMap.SimpleEntry<>("key", ByteString.copyFrom("data", UTF_8)));
}