aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2017-10-02 13:52:36 +0200
committerTeryk Bellahsene <teryk@users.noreply.github.com>2017-10-03 14:45:02 +0200
commite55f17e022e888e22f1cc8d00d089dd071fa707c (patch)
tree4d28ea1eddbc6fecf0a1247182f47d400e452270 /tests
parent266450099096400d6134cc429a462bb52c198b06 (diff)
downloadsonarqube-e55f17e022e888e22f1cc8d00d089dd071fa707c.tar.gz
sonarqube-e55f17e022e888e22f1cc8d00d089dd071fa707c.zip
SONAR-9820 Telemetry returns database name and version
Diffstat (limited to 'tests')
-rw-r--r--tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryUploadTest.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryUploadTest.java b/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryUploadTest.java
index dc4d3c0a9ff..82016455508 100644
--- a/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryUploadTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryUploadTest.java
@@ -82,6 +82,9 @@ public class TelemetryUploadTest {
assertThat(request.getHeader(HttpHeaders.USER_AGENT)).contains("SonarQube");
Map<String, Object> json = jsonToMap(request.getBody().readUtf8());
assertThat(json.get("id")).isEqualTo(serverId());
+ Map<String, String> database = (Map<String, String>) json.get("database");
+ assertThat(database.get("name")).isNotEmpty();
+ assertThat(database.get("version")).isNotEmpty();
assertThat(getInteger(json.get("userCount"))).isEqualTo(1);
List<String> plugins = ((List<Map<String, String>>) json.get("plugins")).stream().map(p -> p.get("name")).collect(Collectors.toList());
assertThat(plugins).contains("xoo");