aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-server-common/src/test/java/org
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2018-08-30 16:58:58 +0200
committerSonarTech <sonartech@sonarsource.com>2018-08-30 20:22:23 +0200
commit61b01c89dfbe4bae2afc5e92c14cb9781b0ff011 (patch)
treeb9a524d42d264fd21723b260c9932f980c17ad96 /server/sonar-server-common/src/test/java/org
parent1d2eb3b5ac8a23c5c4aa1b1ede5ce3f24840ce8a (diff)
downloadsonarqube-61b01c89dfbe4bae2afc5e92c14cb9781b0ff011.tar.gz
sonarqube-61b01c89dfbe4bae2afc5e92c14cb9781b0ff011.zip
Delete webhooks and webhook deliveries only once (#667)
- Deletion were done at 3 places when deleting an organization : -- In the api/organization/delete WS -- In component cleaner -- In PurgeDao - Moreover, the deletion of webhook deliveries in the last 2 classes were not done by project, but by selecting all webhook deliveries of the project and deleting them one by one
Diffstat (limited to 'server/sonar-server-common/src/test/java/org')
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/webhook/WebhookDeliveryStorageTest.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/webhook/WebhookDeliveryStorageTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/webhook/WebhookDeliveryStorageTest.java
index 7273b947c86..f90edd08d8f 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/webhook/WebhookDeliveryStorageTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/webhook/WebhookDeliveryStorageTest.java
@@ -28,13 +28,13 @@ import org.sonar.core.util.UuidFactory;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
-import org.sonar.db.webhook.WebhookDbTesting;
import org.sonar.db.webhook.WebhookDeliveryDto;
+import org.sonar.db.webhook.WebhookDeliveryTesting;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-import static org.sonar.db.webhook.WebhookDbTesting.selectAllDeliveryUuids;
+import static org.sonar.db.webhook.WebhookDeliveryTesting.selectAllDeliveryUuids;
public class WebhookDeliveryStorageTest {
@@ -111,7 +111,7 @@ public class WebhookDeliveryStorageTest {
}
private static WebhookDeliveryDto newDto(String uuid, String componentUuid, long at) {
- return WebhookDbTesting.newDto()
+ return WebhookDeliveryTesting.newDto()
.setUuid(uuid)
.setComponentUuid(componentUuid)
.setCreatedAt(at);