]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-16447 Fix AuditLogs download error due to JSONException
authorMatteo Mara <matteo.mara@sonarsource.com>
Thu, 2 Jun 2022 09:37:36 +0000 (11:37 +0200)
committersonartech <sonartech@sonarsource.com>
Thu, 2 Jun 2022 20:03:18 +0000 (20:03 +0000)
server/sonar-db-dao/src/test/java/org/sonar/db/audit/model/UserNewValueTest.java
server/sonar-db-dao/src/testFixtures/java/org/sonar/db/audit/AuditTesting.java

index 13a497e334eaf1dbe30de67bf33e2e338d34180e..03eae269928b36e03b67ef480272a238415bd15d 100644 (file)
@@ -35,7 +35,7 @@ public class UserNewValueTest {
     userDto.setName("name");
     userDto.setEmail("name@email.com");
     userDto.setActive(true);
-    userDto.setScmAccounts("github-account");
+    userDto.setScmAccounts("\ngithub-account\n");
     userDto.setExternalId("name");
     userDto.setExternalLogin("name");
     userDto.setExternalIdentityProvider("github");
index 8bc48c6508dd465e6eabcf150c20f4e00cf52f69..d5e17a0bfecf784390894557b1b84bb8f37f2847 100644 (file)
@@ -44,7 +44,7 @@ public class AuditTesting {
     auditDto.setUuid(randomAlphanumeric(20));
     auditDto.setUserUuid(randomAlphanumeric(40));
     auditDto.setUserLogin(randomAlphanumeric(40));
-    auditDto.setNewValue("{ \"someKey\": \"someValue\" }");
+    auditDto.setNewValue("{ \"someKey\": \"someValue\",  \"anotherKey\": \"anotherValue\\\n\t\b\f\r\"}");
     auditDto.setOperation(operation);
     auditDto.setCategory("category");
     auditDto.setCreatedAt(createdAt);