Browse Source

Merge remote-tracking branch 'upstream/develop/3.5.1' into feature/notification-rules-disabling

pull/8527/head
Vladyslav_Prykhodko 3 years ago
parent
commit
31858ea48e
  1. 2
      application/pom.xml
  2. 2
      application/src/main/java/org/thingsboard/server/controller/WidgetsBundleController.java
  3. 37
      application/src/main/java/org/thingsboard/server/service/entitiy/widgets/bundle/DefaultWidgetsBundleService.java
  4. 9
      application/src/main/java/org/thingsboard/server/service/entitiy/widgets/bundle/TbWidgetsBundleService.java
  5. 4
      application/src/main/java/org/thingsboard/server/service/notification/rule/trigger/DeviceActivityTriggerProcessor.java
  6. 2
      application/src/main/resources/thingsboard.yml
  7. 4
      application/src/test/java/org/thingsboard/server/controller/AdminControllerTest.java
  8. 6
      application/src/test/java/org/thingsboard/server/controller/AlarmCommentControllerTest.java
  9. 6
      application/src/test/java/org/thingsboard/server/controller/AlarmControllerTest.java
  10. 6
      application/src/test/java/org/thingsboard/server/controller/AssetControllerTest.java
  11. 6
      application/src/test/java/org/thingsboard/server/controller/AssetProfileControllerTest.java
  12. 4
      application/src/test/java/org/thingsboard/server/controller/AuditLogControllerTest.java
  13. 4
      application/src/test/java/org/thingsboard/server/controller/AuthControllerTest.java
  14. 4
      application/src/test/java/org/thingsboard/server/controller/ComponentDescriptorControllerTest.java
  15. 6
      application/src/test/java/org/thingsboard/server/controller/CustomerControllerTest.java
  16. 6
      application/src/test/java/org/thingsboard/server/controller/DashboardControllerTest.java
  17. 6
      application/src/test/java/org/thingsboard/server/controller/DeviceControllerTest.java
  18. 6
      application/src/test/java/org/thingsboard/server/controller/DeviceProfileControllerTest.java
  19. 6
      application/src/test/java/org/thingsboard/server/controller/EdgeControllerTest.java
  20. 4
      application/src/test/java/org/thingsboard/server/controller/EdgeEventControllerTest.java
  21. 4
      application/src/test/java/org/thingsboard/server/controller/EntityQueryControllerTest.java
  22. 4
      application/src/test/java/org/thingsboard/server/controller/EntityRelationControllerTest.java
  23. 6
      application/src/test/java/org/thingsboard/server/controller/EntityViewControllerTest.java
  24. 4
      application/src/test/java/org/thingsboard/server/controller/HomePageApiTest.java
  25. 4
      application/src/test/java/org/thingsboard/server/controller/OtaPackageControllerTest.java
  26. 4
      application/src/test/java/org/thingsboard/server/controller/RpcControllerTest.java
  27. 6
      application/src/test/java/org/thingsboard/server/controller/RuleChainControllerTest.java
  28. 4
      application/src/test/java/org/thingsboard/server/controller/TbResourceControllerTest.java
  29. 4
      application/src/test/java/org/thingsboard/server/controller/TelemetryControllerTest.java
  30. 4
      application/src/test/java/org/thingsboard/server/controller/TenantControllerTest.java
  31. 4
      application/src/test/java/org/thingsboard/server/controller/TenantProfileControllerTest.java
  32. 4
      application/src/test/java/org/thingsboard/server/controller/TwoFactorAuthConfigTest.java
  33. 4
      application/src/test/java/org/thingsboard/server/controller/TwoFactorAuthTest.java
  34. 6
      application/src/test/java/org/thingsboard/server/controller/UserControllerTest.java
  35. 4
      application/src/test/java/org/thingsboard/server/controller/WebsocketApiTest.java
  36. 4
      application/src/test/java/org/thingsboard/server/controller/WidgetTypeControllerTest.java
  37. 146
      application/src/test/java/org/thingsboard/server/controller/WidgetsBundleControllerTest.java
  38. 26
      application/src/test/java/org/thingsboard/server/controller/sql/AdminControllerSqlTest.java
  39. 23
      application/src/test/java/org/thingsboard/server/controller/sql/AlarmCommentControllerSqlTest.java
  40. 23
      application/src/test/java/org/thingsboard/server/controller/sql/AlarmControllerSqlTest.java
  41. 26
      application/src/test/java/org/thingsboard/server/controller/sql/AssetControllerSqlTest.java
  42. 23
      application/src/test/java/org/thingsboard/server/controller/sql/AssetProfileControllerSqlTest.java
  43. 23
      application/src/test/java/org/thingsboard/server/controller/sql/AuditLogControllerSqlTest.java
  44. 26
      application/src/test/java/org/thingsboard/server/controller/sql/AuthControllerSqlTest.java
  45. 23
      application/src/test/java/org/thingsboard/server/controller/sql/ComponentDescriptorControllerSqlTest.java
  46. 26
      application/src/test/java/org/thingsboard/server/controller/sql/CustomerControllerSqlTest.java
  47. 26
      application/src/test/java/org/thingsboard/server/controller/sql/DashboardControllerSqlTest.java
  48. 26
      application/src/test/java/org/thingsboard/server/controller/sql/DeviceControllerSqlTest.java
  49. 23
      application/src/test/java/org/thingsboard/server/controller/sql/DeviceProfileControllerSqlTest.java
  50. 23
      application/src/test/java/org/thingsboard/server/controller/sql/EdgeControllerSqlTest.java
  51. 23
      application/src/test/java/org/thingsboard/server/controller/sql/EdgeEventControllerSqlTest.java
  52. 23
      application/src/test/java/org/thingsboard/server/controller/sql/EntityQueryControllerSqlTest.java
  53. 23
      application/src/test/java/org/thingsboard/server/controller/sql/EntityRelationControllerSqlTest.java
  54. 26
      application/src/test/java/org/thingsboard/server/controller/sql/EntityViewControllerSqlTest.java
  55. 23
      application/src/test/java/org/thingsboard/server/controller/sql/HomePageApiSqlTest.java
  56. 23
      application/src/test/java/org/thingsboard/server/controller/sql/OtaPackageControllerSqlTest.java
  57. 23
      application/src/test/java/org/thingsboard/server/controller/sql/RpcControllerTest.java
  58. 23
      application/src/test/java/org/thingsboard/server/controller/sql/RuleChainControllerSqlTest.java
  59. 23
      application/src/test/java/org/thingsboard/server/controller/sql/TbResourceControllerSqlTest.java
  60. 23
      application/src/test/java/org/thingsboard/server/controller/sql/TelemetryControllerSqlTest.java
  61. 26
      application/src/test/java/org/thingsboard/server/controller/sql/TenantControllerSqlTest.java
  62. 23
      application/src/test/java/org/thingsboard/server/controller/sql/TenantProfileControllerSqlTest.java
  63. 23
      application/src/test/java/org/thingsboard/server/controller/sql/TwoFactorAuthConfigSqlTest.java
  64. 23
      application/src/test/java/org/thingsboard/server/controller/sql/TwoFactorAuthSqlTest.java
  65. 26
      application/src/test/java/org/thingsboard/server/controller/sql/UserControllerSqlTest.java
  66. 23
      application/src/test/java/org/thingsboard/server/controller/sql/WebsocketApiSqlTest.java
  67. 26
      application/src/test/java/org/thingsboard/server/controller/sql/WidgetTypeControllerSqlTest.java
  68. 26
      application/src/test/java/org/thingsboard/server/controller/sql/WidgetsBundleControllerSqlTest.java
  69. 4
      application/src/test/java/org/thingsboard/server/edge/AlarmEdgeTest.java
  70. 4
      application/src/test/java/org/thingsboard/server/edge/AssetEdgeTest.java
  71. 4
      application/src/test/java/org/thingsboard/server/edge/AssetProfileEdgeTest.java
  72. 4
      application/src/test/java/org/thingsboard/server/edge/CustomerEdgeTest.java
  73. 4
      application/src/test/java/org/thingsboard/server/edge/DashboardEdgeTest.java
  74. 4
      application/src/test/java/org/thingsboard/server/edge/DeviceEdgeTest.java
  75. 4
      application/src/test/java/org/thingsboard/server/edge/DeviceProfileEdgeTest.java
  76. 4
      application/src/test/java/org/thingsboard/server/edge/EdgeTest.java
  77. 4
      application/src/test/java/org/thingsboard/server/edge/EntityViewEdgeTest.java
  78. 4
      application/src/test/java/org/thingsboard/server/edge/OtaPackageEdgeTest.java
  79. 4
      application/src/test/java/org/thingsboard/server/edge/QueueEdgeTest.java
  80. 4
      application/src/test/java/org/thingsboard/server/edge/RelationEdgeTest.java
  81. 4
      application/src/test/java/org/thingsboard/server/edge/RuleChainEdgeTest.java
  82. 4
      application/src/test/java/org/thingsboard/server/edge/TelemetryEdgeTest.java
  83. 4
      application/src/test/java/org/thingsboard/server/edge/UserEdgeTest.java
  84. 4
      application/src/test/java/org/thingsboard/server/edge/WidgetEdgeTest.java
  85. 24
      application/src/test/java/org/thingsboard/server/edge/sql/AlarmEdgeSqlTest.java
  86. 24
      application/src/test/java/org/thingsboard/server/edge/sql/AssetEdgeSqlTest.java
  87. 24
      application/src/test/java/org/thingsboard/server/edge/sql/AssetProfileEdgeSqlTest.java
  88. 24
      application/src/test/java/org/thingsboard/server/edge/sql/CustomerEdgeSqlTest.java
  89. 24
      application/src/test/java/org/thingsboard/server/edge/sql/DashboardEdgeSqlTest.java
  90. 24
      application/src/test/java/org/thingsboard/server/edge/sql/DeviceEdgeSqlTest.java
  91. 24
      application/src/test/java/org/thingsboard/server/edge/sql/DeviceProfileEdgeSqlTest.java
  92. 24
      application/src/test/java/org/thingsboard/server/edge/sql/EdgeSqlTest.java
  93. 24
      application/src/test/java/org/thingsboard/server/edge/sql/EntityViewEdgeSqlTest.java
  94. 24
      application/src/test/java/org/thingsboard/server/edge/sql/OtaPackageEdgeSqlTest.java
  95. 24
      application/src/test/java/org/thingsboard/server/edge/sql/QueueEdgeSqlTest.java
  96. 24
      application/src/test/java/org/thingsboard/server/edge/sql/RelationEdgeSqlTest.java
  97. 24
      application/src/test/java/org/thingsboard/server/edge/sql/RuleChainEdgeSqlTest.java
  98. 24
      application/src/test/java/org/thingsboard/server/edge/sql/TelemetryEdgeSqlTest.java
  99. 24
      application/src/test/java/org/thingsboard/server/edge/sql/UserEdgeSqlTest.java
  100. 24
      application/src/test/java/org/thingsboard/server/edge/sql/WidgetEdgeSqlTest.java

2
application/pom.xml

@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.thingsboard</groupId>
<version>3.5.0-SNAPSHOT</version>
<version>3.5.1-SNAPSHOT</version>
<artifactId>thingsboard</artifactId>
</parent>
<artifactId>application</artifactId>

2
application/src/main/java/org/thingsboard/server/controller/WidgetsBundleController.java

@ -117,7 +117,7 @@ public class WidgetsBundleController extends BaseController {
checkParameter("widgetsBundleId", strWidgetsBundleId);
WidgetsBundleId widgetsBundleId = new WidgetsBundleId(toUUID(strWidgetsBundleId));
WidgetsBundle widgetsBundle = checkWidgetsBundleId(widgetsBundleId, Operation.DELETE);
tbWidgetsBundleService.delete(widgetsBundle);
tbWidgetsBundleService.delete(widgetsBundle, getCurrentUser());
}
@ApiOperation(value = "Get Widget Bundles (getWidgetsBundles)",

37
application/src/main/java/org/thingsboard/server/service/entitiy/widgets/bundle/DefaultWidgetsBundleService.java

@ -17,9 +17,10 @@ package org.thingsboard.server.service.entitiy.widgets.bundle;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.thingsboard.server.common.data.EntityType;
import org.thingsboard.server.common.data.User;
import org.thingsboard.server.common.data.edge.EdgeEventActionType;
import org.thingsboard.server.common.data.exception.ThingsboardException;
import org.thingsboard.server.common.data.audit.ActionType;
import org.thingsboard.server.common.data.id.TenantId;
import org.thingsboard.server.common.data.widget.WidgetsBundle;
import org.thingsboard.server.dao.widget.WidgetsBundleService;
import org.thingsboard.server.queue.util.TbCoreComponent;
@ -34,17 +35,31 @@ public class DefaultWidgetsBundleService extends AbstractTbEntityService impleme
@Override
public WidgetsBundle save(WidgetsBundle widgetsBundle, User user) throws Exception {
WidgetsBundle savedWidgetsBundle = checkNotNull(widgetsBundleService.saveWidgetsBundle(widgetsBundle));
autoCommit(user, savedWidgetsBundle.getId());
notificationEntityService.notifySendMsgToEdgeService(widgetsBundle.getTenantId(), savedWidgetsBundle.getId(),
widgetsBundle.getId() == null ? EdgeEventActionType.ADDED : EdgeEventActionType.UPDATED);
return savedWidgetsBundle;
ActionType actionType = widgetsBundle.getId() == null ? ActionType.ADDED : ActionType.UPDATED;
TenantId tenantId = widgetsBundle.getTenantId();
try {
WidgetsBundle savedWidgetsBundle = checkNotNull(widgetsBundleService.saveWidgetsBundle(widgetsBundle));
autoCommit(user, savedWidgetsBundle.getId());
notificationEntityService.notifyCreateOrUpdateOrDelete(tenantId, null, savedWidgetsBundle.getId(),
savedWidgetsBundle, user, actionType, true, null);
return savedWidgetsBundle;
} catch (Exception e) {
notificationEntityService.logEntityAction(tenantId, emptyId(EntityType.WIDGETS_BUNDLE), widgetsBundle, actionType, user, e);
throw e;
}
}
@Override
public void delete(WidgetsBundle widgetsBundle) throws ThingsboardException {
widgetsBundleService.deleteWidgetsBundle(widgetsBundle.getTenantId(), widgetsBundle.getId());
notificationEntityService.notifySendMsgToEdgeService(widgetsBundle.getTenantId(), widgetsBundle.getId(),
EdgeEventActionType.DELETED);
public void delete(WidgetsBundle widgetsBundle, User user) {
TenantId tenantId = widgetsBundle.getTenantId();
try {
widgetsBundleService.deleteWidgetsBundle(widgetsBundle.getTenantId(), widgetsBundle.getId());
notificationEntityService.notifyCreateOrUpdateOrDelete(tenantId, null, widgetsBundle.getId(), widgetsBundle,
user, ActionType.DELETED, true, null);
} catch (Exception e) {
notificationEntityService.logEntityAction(tenantId, emptyId(EntityType.WIDGETS_BUNDLE),
ActionType.DELETED, user, e, widgetsBundle.getId());
throw e;
}
}
}

9
application/src/main/java/org/thingsboard/server/service/entitiy/widgets/bundle/TbWidgetsBundleService.java

@ -15,13 +15,8 @@
*/
package org.thingsboard.server.service.entitiy.widgets.bundle;
import org.thingsboard.server.common.data.User;
import org.thingsboard.server.common.data.exception.ThingsboardException;
import org.thingsboard.server.common.data.widget.WidgetsBundle;
import org.thingsboard.server.service.entitiy.SimpleTbEntityService;
public interface TbWidgetsBundleService {
WidgetsBundle save(WidgetsBundle entity, User currentUser) throws Exception;
void delete(WidgetsBundle entity) throws ThingsboardException;
public interface TbWidgetsBundleService extends SimpleTbEntityService<WidgetsBundle> {
}

4
application/src/main/java/org/thingsboard/server/service/notification/rule/trigger/DeviceActivityTriggerProcessor.java

@ -20,6 +20,7 @@ import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Service;
import org.thingsboard.server.common.data.DataConstants;
import org.thingsboard.server.common.data.DeviceProfile;
import org.thingsboard.server.common.data.EntityType;
import org.thingsboard.server.common.data.id.DeviceId;
import org.thingsboard.server.common.data.id.TenantId;
import org.thingsboard.server.common.data.notification.info.DeviceActivityNotificationInfo;
@ -41,6 +42,9 @@ public class DeviceActivityTriggerProcessor implements RuleEngineMsgNotification
@Override
public boolean matchesFilter(RuleEngineMsgTrigger trigger, DeviceActivityNotificationRuleTriggerConfig triggerConfig) {
if (trigger.getMsg().getOriginator().getEntityType() != EntityType.DEVICE) {
return false;
}
DeviceEvent event = trigger.getMsg().getType().equals(DataConstants.ACTIVITY_EVENT) ? DeviceEvent.ACTIVE : DeviceEvent.INACTIVE;
if (!triggerConfig.getNotifyOn().contains(event)) {
return false;

2
application/src/main/resources/thingsboard.yml

@ -607,6 +607,7 @@ spring:
username: "${SPRING_DATASOURCE_USERNAME:postgres}"
password: "${SPRING_DATASOURCE_PASSWORD:postgres}"
hikari:
leakDetectionThreshold: "${SPRING_DATASOURCE_HIKARI_LEAK_DETECTION_THRESHOLD:0}"
maximumPoolSize: "${SPRING_DATASOURCE_MAXIMUM_POOL_SIZE:16}"
registerMbeans: "${SPRING_DATASOURCE_HIKARI_REGISTER_MBEANS:false}" # true - enable MBean to diagnose pools state via JMX
@ -621,6 +622,7 @@ audit-log:
"device": "${AUDIT_LOG_MASK_DEVICE:W}"
"asset": "${AUDIT_LOG_MASK_ASSET:W}"
"dashboard": "${AUDIT_LOG_MASK_DASHBOARD:W}"
"widgets_bundle": "${AUDIT_LOG_MASK_WIDGETS_BUNDLE:W}"
"customer": "${AUDIT_LOG_MASK_CUSTOMER:W}"
"user": "${AUDIT_LOG_MASK_USER:W}"
"rule_chain": "${AUDIT_LOG_MASK_RULE_CHAIN:W}"

4
application/src/test/java/org/thingsboard/server/controller/BaseAdminControllerTest.java → application/src/test/java/org/thingsboard/server/controller/AdminControllerTest.java

@ -24,6 +24,7 @@ import org.mockito.Mockito;
import org.thingsboard.common.util.JacksonUtil;
import org.thingsboard.server.common.data.AdminSettings;
import org.thingsboard.server.common.data.security.model.JwtSettings;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
@ -39,7 +40,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@Slf4j
public abstract class BaseAdminControllerTest extends AbstractControllerTest {
@DaoSqlTest
public class AdminControllerTest extends AbstractControllerTest {
final JwtSettings defaultJwtSettings = new JwtSettings(9000, 604800, "thingsboard.io", "thingsboardDefaultSigningKey");
@Test

6
application/src/test/java/org/thingsboard/server/controller/BaseAlarmCommentControllerTest.java → application/src/test/java/org/thingsboard/server/controller/AlarmCommentControllerTest.java

@ -40,6 +40,7 @@ import org.thingsboard.server.common.data.audit.ActionType;
import org.thingsboard.server.common.data.id.AlarmId;
import org.thingsboard.server.common.data.page.PageData;
import org.thingsboard.server.dao.alarm.AlarmDao;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.util.LinkedList;
import java.util.List;
@ -48,8 +49,9 @@ import static org.hamcrest.Matchers.containsString;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@Slf4j
@ContextConfiguration(classes = {BaseAlarmCommentControllerTest.Config.class})
public abstract class BaseAlarmCommentControllerTest extends AbstractControllerTest {
@ContextConfiguration(classes = {AlarmCommentControllerTest.Config.class})
@DaoSqlTest
public class AlarmCommentControllerTest extends AbstractControllerTest {
protected Device customerDevice;
protected Alarm alarm;

6
application/src/test/java/org/thingsboard/server/controller/BaseAlarmControllerTest.java → application/src/test/java/org/thingsboard/server/controller/AlarmControllerTest.java

@ -40,6 +40,7 @@ import org.thingsboard.server.common.data.audit.ActionType;
import org.thingsboard.server.common.data.id.AlarmId;
import org.thingsboard.server.common.data.page.PageData;
import org.thingsboard.server.dao.alarm.AlarmDao;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.util.LinkedList;
import java.util.List;
@ -48,8 +49,9 @@ import static org.hamcrest.Matchers.containsString;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@Slf4j
@ContextConfiguration(classes = {BaseAlarmControllerTest.Config.class})
public abstract class BaseAlarmControllerTest extends AbstractControllerTest {
@ContextConfiguration(classes = {AlarmControllerTest.Config.class})
@DaoSqlTest
public class AlarmControllerTest extends AbstractControllerTest {
public static final String TEST_ALARM_TYPE = "Test";

6
application/src/test/java/org/thingsboard/server/controller/BaseAssetControllerTest.java → application/src/test/java/org/thingsboard/server/controller/AssetControllerTest.java

@ -46,6 +46,7 @@ import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.dao.asset.AssetDao;
import org.thingsboard.server.dao.exception.DataValidationException;
import org.thingsboard.server.dao.model.ModelConstants;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.service.stats.DefaultRuleEngineStatisticsService;
import java.util.ArrayList;
@ -56,8 +57,9 @@ import static org.hamcrest.Matchers.containsString;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.thingsboard.server.dao.model.ModelConstants.NULL_UUID;
@ContextConfiguration(classes = {BaseAssetControllerTest.Config.class})
public abstract class BaseAssetControllerTest extends AbstractControllerTest {
@ContextConfiguration(classes = {AssetControllerTest.Config.class})
@DaoSqlTest
public class AssetControllerTest extends AbstractControllerTest {
private IdComparator<Asset> idComparator = new IdComparator<>();

6
application/src/test/java/org/thingsboard/server/controller/BaseAssetProfileControllerTest.java → application/src/test/java/org/thingsboard/server/controller/AssetProfileControllerTest.java

@ -42,6 +42,7 @@ import org.thingsboard.server.common.data.rule.RuleChain;
import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.dao.asset.AssetProfileDao;
import org.thingsboard.server.dao.exception.DataValidationException;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.util.ArrayList;
import java.util.Collections;
@ -51,8 +52,9 @@ import java.util.stream.Collectors;
import static org.hamcrest.Matchers.containsString;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@ContextConfiguration(classes = {BaseAssetProfileControllerTest.Config.class})
public abstract class BaseAssetProfileControllerTest extends AbstractControllerTest {
@ContextConfiguration(classes = {AssetProfileControllerTest.Config.class})
@DaoSqlTest
public class AssetProfileControllerTest extends AbstractControllerTest {
private IdComparator<AssetProfile> idComparator = new IdComparator<>();
private IdComparator<AssetProfileInfo> assetProfileInfoIdComparator = new IdComparator<>();

4
application/src/test/java/org/thingsboard/server/controller/BaseAuditLogControllerTest.java → application/src/test/java/org/thingsboard/server/controller/AuditLogControllerTest.java

@ -34,6 +34,7 @@ import org.thingsboard.server.common.data.page.TimePageLink;
import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.dao.audit.AuditLogDao;
import org.thingsboard.server.dao.model.ModelConstants;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.dao.sqlts.insert.sql.SqlPartitioningRepository;
import org.thingsboard.server.service.ttl.AuditLogsCleanUpService;
@ -50,7 +51,8 @@ import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.verify;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
public abstract class BaseAuditLogControllerTest extends AbstractControllerTest {
@DaoSqlTest
public class AuditLogControllerTest extends AbstractControllerTest {
private Tenant savedTenant;
private User tenantAdmin;

4
application/src/test/java/org/thingsboard/server/controller/BaseAuthControllerTest.java → application/src/test/java/org/thingsboard/server/controller/AuthControllerTest.java

@ -17,6 +17,7 @@ package org.thingsboard.server.controller;
import org.junit.Test;
import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.util.concurrent.TimeUnit;
@ -24,7 +25,8 @@ import static org.hamcrest.Matchers.is;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
public abstract class BaseAuthControllerTest extends AbstractControllerTest {
@DaoSqlTest
public class AuthControllerTest extends AbstractControllerTest {
@Test
public void testGetUser() throws Exception {

4
application/src/test/java/org/thingsboard/server/controller/BaseComponentDescriptorControllerTest.java → application/src/test/java/org/thingsboard/server/controller/ComponentDescriptorControllerTest.java

@ -28,12 +28,14 @@ import org.thingsboard.server.common.data.plugin.ComponentScope;
import org.thingsboard.server.common.data.plugin.ComponentType;
import org.thingsboard.server.common.data.rule.RuleChainType;
import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.util.List;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
public abstract class BaseComponentDescriptorControllerTest extends AbstractControllerTest {
@DaoSqlTest
public class ComponentDescriptorControllerTest extends AbstractControllerTest {
private static final int AMOUNT_OF_DEFAULT_FILTER_NODES = 4;
private Tenant savedTenant;

6
application/src/test/java/org/thingsboard/server/controller/BaseCustomerControllerTest.java → application/src/test/java/org/thingsboard/server/controller/CustomerControllerTest.java

@ -44,6 +44,7 @@ import org.thingsboard.server.common.data.page.PageLink;
import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.dao.customer.CustomerDao;
import org.thingsboard.server.dao.exception.DataValidationException;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.util.ArrayList;
import java.util.List;
@ -53,8 +54,9 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.Matchers.containsString;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@ContextConfiguration(classes = {BaseCustomerControllerTest.Config.class})
public abstract class BaseCustomerControllerTest extends AbstractControllerTest {
@ContextConfiguration(classes = {CustomerControllerTest.Config.class})
@DaoSqlTest
public class CustomerControllerTest extends AbstractControllerTest {
static final TypeReference<PageData<Customer>> PAGE_DATA_CUSTOMER_TYPE_REFERENCE = new TypeReference<>() {
};

6
application/src/test/java/org/thingsboard/server/controller/BaseDashboardControllerTest.java → application/src/test/java/org/thingsboard/server/controller/DashboardControllerTest.java

@ -43,6 +43,7 @@ import org.thingsboard.server.common.data.page.PageLink;
import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.dao.dashboard.DashboardDao;
import org.thingsboard.server.dao.exception.DataValidationException;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.util.ArrayList;
import java.util.Collections;
@ -51,8 +52,9 @@ import java.util.List;
import static org.hamcrest.Matchers.containsString;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@ContextConfiguration(classes = {BaseDashboardControllerTest.Config.class})
public abstract class BaseDashboardControllerTest extends AbstractControllerTest {
@ContextConfiguration(classes = {DashboardControllerTest.Config.class})
@DaoSqlTest
public class DashboardControllerTest extends AbstractControllerTest {
private IdComparator<DashboardInfo> idComparator = new IdComparator<>();

6
application/src/test/java/org/thingsboard/server/controller/BaseDeviceControllerTest.java → application/src/test/java/org/thingsboard/server/controller/DeviceControllerTest.java

@ -68,6 +68,7 @@ import org.thingsboard.server.dao.device.DeviceDao;
import org.thingsboard.server.dao.exception.DataValidationException;
import org.thingsboard.server.dao.exception.DeviceCredentialsValidationException;
import org.thingsboard.server.dao.model.ModelConstants;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.service.gateway_device.GatewayNotificationsService;
import java.util.ArrayList;
@ -84,8 +85,9 @@ import static org.thingsboard.server.common.data.ota.OtaPackageType.FIRMWARE;
import static org.thingsboard.server.common.data.ota.OtaPackageType.SOFTWARE;
import static org.thingsboard.server.dao.model.ModelConstants.NULL_UUID;
@ContextConfiguration(classes = {BaseDeviceControllerTest.Config.class})
public abstract class BaseDeviceControllerTest extends AbstractControllerTest {
@ContextConfiguration(classes = {DeviceControllerTest.Config.class})
@DaoSqlTest
public class DeviceControllerTest extends AbstractControllerTest {
static final TypeReference<PageData<Device>> PAGE_DATA_DEVICE_TYPE_REF = new TypeReference<>() {
};

6
application/src/test/java/org/thingsboard/server/controller/BaseDeviceProfileControllerTest.java → application/src/test/java/org/thingsboard/server/controller/DeviceProfileControllerTest.java

@ -51,6 +51,7 @@ import org.thingsboard.server.common.data.rule.RuleChain;
import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.dao.device.DeviceProfileDao;
import org.thingsboard.server.dao.exception.DataValidationException;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.util.ArrayList;
import java.util.Collections;
@ -62,8 +63,9 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import static org.thingsboard.server.common.data.ota.OtaPackageType.FIRMWARE;
import static org.thingsboard.server.common.data.ota.OtaPackageType.SOFTWARE;
@ContextConfiguration(classes = {BaseDeviceProfileControllerTest.Config.class})
public abstract class BaseDeviceProfileControllerTest extends AbstractControllerTest {
@ContextConfiguration(classes = {DeviceProfileControllerTest.Config.class})
@DaoSqlTest
public class DeviceProfileControllerTest extends AbstractControllerTest {
private IdComparator<DeviceProfile> idComparator = new IdComparator<>();
private IdComparator<DeviceProfileInfo> deviceProfileInfoIdComparator = new IdComparator<>();

6
application/src/test/java/org/thingsboard/server/controller/BaseEdgeControllerTest.java → application/src/test/java/org/thingsboard/server/controller/EdgeControllerTest.java

@ -52,6 +52,7 @@ import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.dao.edge.EdgeDao;
import org.thingsboard.server.dao.exception.DataValidationException;
import org.thingsboard.server.dao.model.ModelConstants;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.edge.imitator.EdgeImitator;
import org.thingsboard.server.gen.edge.v1.AdminSettingsUpdateMsg;
import org.thingsboard.server.gen.edge.v1.AssetProfileUpdateMsg;
@ -77,8 +78,9 @@ import static org.thingsboard.server.dao.model.ModelConstants.NULL_UUID;
@TestPropertySource(properties = {
"edges.enabled=true",
})
@ContextConfiguration(classes = {BaseEdgeControllerTest.Config.class})
public abstract class BaseEdgeControllerTest extends AbstractControllerTest {
@ContextConfiguration(classes = {EdgeControllerTest.Config.class})
@DaoSqlTest
public class EdgeControllerTest extends AbstractControllerTest {
public static final String EDGE_HOST = "localhost";
public static final int EDGE_PORT = 7070;

4
application/src/test/java/org/thingsboard/server/controller/BaseEdgeEventControllerTest.java → application/src/test/java/org/thingsboard/server/controller/EdgeEventControllerTest.java

@ -40,6 +40,7 @@ import org.thingsboard.server.common.data.page.TimePageLink;
import org.thingsboard.server.common.data.relation.EntityRelation;
import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.dao.edge.EdgeEventDao;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.dao.sqlts.insert.sql.SqlPartitioningRepository;
import org.thingsboard.server.service.ttl.EdgeEventsCleanUpService;
@ -59,7 +60,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
"edges.enabled=true",
})
@Slf4j
public abstract class BaseEdgeEventControllerTest extends AbstractControllerTest {
@DaoSqlTest
public class EdgeEventControllerTest extends AbstractControllerTest {
private Tenant savedTenant;
private User tenantAdmin;

4
application/src/test/java/org/thingsboard/server/controller/BaseEntityQueryControllerTest.java → application/src/test/java/org/thingsboard/server/controller/EntityQueryControllerTest.java

@ -52,6 +52,7 @@ import org.thingsboard.server.common.data.query.KeyFilter;
import org.thingsboard.server.common.data.query.NumericFilterPredicate;
import org.thingsboard.server.common.data.query.TsValue;
import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.util.ArrayList;
import java.util.Collections;
@ -62,7 +63,8 @@ import java.util.stream.Collectors;
import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
public abstract class BaseEntityQueryControllerTest extends AbstractControllerTest {
@DaoSqlTest
public class EntityQueryControllerTest extends AbstractControllerTest {
private Tenant savedTenant;
private User tenantAdmin;

4
application/src/test/java/org/thingsboard/server/controller/BaseEntityRelationControllerTest.java → application/src/test/java/org/thingsboard/server/controller/EntityRelationControllerTest.java

@ -41,6 +41,7 @@ import org.thingsboard.server.common.data.relation.RelationTypeGroup;
import org.thingsboard.server.common.data.relation.RelationsSearchParameters;
import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.dao.relation.RelationService;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.util.Collections;
import java.util.List;
@ -50,7 +51,8 @@ import static org.hamcrest.Matchers.containsString;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@Slf4j
public abstract class BaseEntityRelationControllerTest extends AbstractControllerTest {
@DaoSqlTest
public class EntityRelationControllerTest extends AbstractControllerTest {
public static final String BASE_DEVICE_NAME = "Test dummy device";

6
application/src/test/java/org/thingsboard/server/controller/BaseEntityViewControllerTest.java → application/src/test/java/org/thingsboard/server/controller/EntityViewControllerTest.java

@ -64,6 +64,7 @@ import org.thingsboard.server.common.data.security.DeviceCredentials;
import org.thingsboard.server.dao.entityview.EntityViewDao;
import org.thingsboard.server.dao.exception.DataValidationException;
import org.thingsboard.server.dao.model.ModelConstants;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.util.ArrayList;
import java.util.HashSet;
@ -89,8 +90,9 @@ import static org.thingsboard.server.dao.model.ModelConstants.NULL_UUID;
"js.evaluator=mock",
})
@Slf4j
@ContextConfiguration(classes = {BaseEntityViewControllerTest.Config.class})
public abstract class BaseEntityViewControllerTest extends AbstractControllerTest {
@ContextConfiguration(classes = {EntityViewControllerTest.Config.class})
@DaoSqlTest
public class EntityViewControllerTest extends AbstractControllerTest {
static final TypeReference<PageData<EntityView>> PAGE_DATA_ENTITY_VIEW_TYPE_REF = new TypeReference<>() {
};
static final TypeReference<PageData<EntityViewInfo>> PAGE_DATA_ENTITY_VIEW_INFO_TYPE_REF = new TypeReference<>() {

4
application/src/test/java/org/thingsboard/server/controller/BaseHomePageApiTest.java → application/src/test/java/org/thingsboard/server/controller/HomePageApiTest.java

@ -57,6 +57,7 @@ import org.thingsboard.server.common.data.query.TsValue;
import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.common.data.tenant.profile.DefaultTenantProfileConfiguration;
import org.thingsboard.server.common.stats.TbApiUsageStateClient;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.dao.settings.AdminSettingsService;
import org.thingsboard.server.dao.tenant.TbTenantProfileCache;
import org.thingsboard.server.service.ws.telemetry.cmd.v2.EntityCountCmd;
@ -73,7 +74,8 @@ import java.util.concurrent.TimeUnit;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@Slf4j
public abstract class BaseHomePageApiTest extends AbstractControllerTest {
@DaoSqlTest
public class HomePageApiTest extends AbstractControllerTest {
@Autowired
private TbApiUsageStateClient apiUsageStateClient;

4
application/src/test/java/org/thingsboard/server/controller/BaseOtaPackageControllerTest.java → application/src/test/java/org/thingsboard/server/controller/OtaPackageControllerTest.java

@ -38,6 +38,7 @@ import org.thingsboard.server.common.data.page.PageData;
import org.thingsboard.server.common.data.page.PageLink;
import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.dao.exception.DataValidationException;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.nio.ByteBuffer;
import java.util.ArrayList;
@ -48,7 +49,8 @@ import static org.hamcrest.Matchers.containsString;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.thingsboard.server.common.data.ota.OtaPackageType.FIRMWARE;
public abstract class BaseOtaPackageControllerTest extends AbstractControllerTest {
@DaoSqlTest
public class OtaPackageControllerTest extends AbstractControllerTest {
private IdComparator<OtaPackageInfo> idComparator = new IdComparator<>();

4
application/src/test/java/org/thingsboard/server/controller/BaseRpcControllerTest.java → application/src/test/java/org/thingsboard/server/controller/RpcControllerTest.java

@ -31,12 +31,14 @@ import org.thingsboard.server.common.data.page.PageData;
import org.thingsboard.server.common.data.rpc.Rpc;
import org.thingsboard.server.common.data.rpc.RpcStatus;
import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.util.List;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
public abstract class BaseRpcControllerTest extends AbstractControllerTest {
@DaoSqlTest
public class RpcControllerTest extends AbstractControllerTest {
private Tenant savedTenant;
private User tenantAdmin;

6
application/src/test/java/org/thingsboard/server/controller/BaseRuleChainControllerTest.java → application/src/test/java/org/thingsboard/server/controller/RuleChainControllerTest.java

@ -44,6 +44,7 @@ import org.thingsboard.server.common.data.rule.RuleNode;
import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.dao.exception.DataValidationException;
import org.thingsboard.server.dao.rule.RuleChainDao;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.util.ArrayList;
import java.util.Collections;
@ -53,8 +54,9 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.Matchers.containsString;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@ContextConfiguration(classes = {BaseRuleChainControllerTest.Config.class})
public abstract class BaseRuleChainControllerTest extends AbstractControllerTest {
@ContextConfiguration(classes = {RuleChainControllerTest.Config.class})
@DaoSqlTest
public class RuleChainControllerTest extends AbstractControllerTest {
private IdComparator<RuleChain> idComparator = new IdComparator<>();

4
application/src/test/java/org/thingsboard/server/controller/BaseTbResourceControllerTest.java → application/src/test/java/org/thingsboard/server/controller/TbResourceControllerTest.java

@ -32,6 +32,7 @@ import org.thingsboard.server.common.data.page.PageData;
import org.thingsboard.server.common.data.page.PageLink;
import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.dao.exception.DataValidationException;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.util.ArrayList;
import java.util.Collections;
@ -40,7 +41,8 @@ import java.util.List;
import static org.hamcrest.Matchers.containsString;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
public abstract class BaseTbResourceControllerTest extends AbstractControllerTest {
@DaoSqlTest
public class TbResourceControllerTest extends AbstractControllerTest {
private IdComparator<TbResourceInfo> idComparator = new IdComparator<>();

4
application/src/test/java/org/thingsboard/server/controller/BaseTelemetryControllerTest.java → application/src/test/java/org/thingsboard/server/controller/TelemetryControllerTest.java

@ -20,10 +20,12 @@ import org.thingsboard.server.common.data.Device;
import org.thingsboard.server.common.data.SaveDeviceWithCredentialsRequest;
import org.thingsboard.server.common.data.security.DeviceCredentials;
import org.thingsboard.server.common.data.security.DeviceCredentialsType;
import org.thingsboard.server.dao.service.DaoSqlTest;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
public abstract class BaseTelemetryControllerTest extends AbstractControllerTest {
@DaoSqlTest
public class TelemetryControllerTest extends AbstractControllerTest {
@Test
public void testConstraintValidator() throws Exception {

4
application/src/test/java/org/thingsboard/server/controller/BaseTenantControllerTest.java → application/src/test/java/org/thingsboard/server/controller/TenantControllerTest.java

@ -49,6 +49,7 @@ import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.common.data.tenant.profile.DefaultTenantProfileConfiguration;
import org.thingsboard.server.common.data.tenant.profile.TenantProfileData;
import org.thingsboard.server.common.data.tenant.profile.TenantProfileQueueConfiguration;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.util.ArrayList;
import java.util.Comparator;
@ -69,7 +70,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
"js.evaluator=mock",
})
@Slf4j
public abstract class BaseTenantControllerTest extends AbstractControllerTest {
@DaoSqlTest
public class TenantControllerTest extends AbstractControllerTest {
static final TypeReference<PageData<Tenant>> PAGE_DATA_TENANT_TYPE_REF = new TypeReference<>() {
};

4
application/src/test/java/org/thingsboard/server/controller/BaseTenantProfileControllerTest.java → application/src/test/java/org/thingsboard/server/controller/TenantProfileControllerTest.java

@ -36,6 +36,7 @@ import org.thingsboard.server.common.data.queue.SubmitStrategyType;
import org.thingsboard.server.common.data.tenant.profile.DefaultTenantProfileConfiguration;
import org.thingsboard.server.common.data.tenant.profile.TenantProfileData;
import org.thingsboard.server.common.data.tenant.profile.TenantProfileQueueConfiguration;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.util.ArrayList;
import java.util.Collections;
@ -47,7 +48,8 @@ import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
public abstract class BaseTenantProfileControllerTest extends AbstractControllerTest {
@DaoSqlTest
public class TenantProfileControllerTest extends AbstractControllerTest {
private IdComparator<TenantProfile> idComparator = new IdComparator<>();
private IdComparator<EntityInfo> tenantProfileInfoIdComparator = new IdComparator<>();

4
application/src/test/java/org/thingsboard/server/controller/TwoFactorAuthConfigTest.java

@ -39,6 +39,7 @@ import org.thingsboard.server.common.data.security.model.mfa.provider.SmsTwoFaPr
import org.thingsboard.server.common.data.security.model.mfa.provider.TotpTwoFaProviderConfig;
import org.thingsboard.server.common.data.security.model.mfa.provider.TwoFaProviderConfig;
import org.thingsboard.server.common.data.security.model.mfa.provider.TwoFaProviderType;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.service.security.auth.mfa.TwoFactorAuthService;
import org.thingsboard.server.service.security.auth.mfa.config.TwoFaConfigManager;
import org.thingsboard.server.service.security.auth.mfa.provider.impl.OtpBasedTwoFaProvider;
@ -58,7 +59,8 @@ import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.verify;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
public abstract class TwoFactorAuthConfigTest extends AbstractControllerTest {
@DaoSqlTest
public class TwoFactorAuthConfigTest extends AbstractControllerTest {
@SpyBean
private TotpTwoFaProvider totpTwoFactorAuthProvider;

4
application/src/test/java/org/thingsboard/server/controller/TwoFactorAuthTest.java

@ -48,6 +48,7 @@ import org.thingsboard.server.common.data.security.model.mfa.provider.TotpTwoFaP
import org.thingsboard.server.common.data.security.model.mfa.provider.TwoFaProviderConfig;
import org.thingsboard.server.common.data.security.model.mfa.provider.TwoFaProviderType;
import org.thingsboard.server.dao.audit.AuditLogService;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.dao.user.UserService;
import org.thingsboard.server.service.security.auth.mfa.TwoFactorAuthService;
import org.thingsboard.server.service.security.auth.mfa.config.TwoFaConfigManager;
@ -72,7 +73,8 @@ import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.verify;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
public abstract class TwoFactorAuthTest extends AbstractControllerTest {
@DaoSqlTest
public class TwoFactorAuthTest extends AbstractControllerTest {
@Autowired
private TwoFaConfigManager twoFaConfigManager;

6
application/src/test/java/org/thingsboard/server/controller/BaseUserControllerTest.java → application/src/test/java/org/thingsboard/server/controller/UserControllerTest.java

@ -50,6 +50,7 @@ import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.common.data.settings.StarredDashboardInfo;
import org.thingsboard.server.common.data.settings.UserDashboardsInfo;
import org.thingsboard.server.dao.exception.DataValidationException;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.dao.user.UserDao;
import java.util.ArrayList;
@ -66,8 +67,9 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.thingsboard.server.dao.model.ModelConstants.SYSTEM_TENANT;
@ContextConfiguration(classes = {BaseUserControllerTest.Config.class})
public abstract class BaseUserControllerTest extends AbstractControllerTest {
@ContextConfiguration(classes = {UserControllerTest.Config.class})
@DaoSqlTest
public class UserControllerTest extends AbstractControllerTest {
private IdComparator<User> idComparator = new IdComparator<>();
private IdComparator<UserEmailInfo> userDataIdComparator = new IdComparator<>();

4
application/src/test/java/org/thingsboard/server/controller/BaseWebsocketApiTest.java → application/src/test/java/org/thingsboard/server/controller/WebsocketApiTest.java

@ -53,6 +53,7 @@ import org.thingsboard.server.common.data.query.KeyFilter;
import org.thingsboard.server.common.data.query.NumericFilterPredicate;
import org.thingsboard.server.common.data.query.SingleEntityFilter;
import org.thingsboard.server.common.data.query.TsValue;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.service.subscription.SubscriptionErrorCode;
import org.thingsboard.server.service.subscription.TbAttributeSubscriptionScope;
import org.thingsboard.server.service.telemetry.TelemetrySubscriptionService;
@ -73,7 +74,8 @@ import static org.assertj.core.api.Assertions.assertThatNoException;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@Slf4j
public abstract class BaseWebsocketApiTest extends AbstractControllerTest {
@DaoSqlTest
public class WebsocketApiTest extends AbstractControllerTest {
@Autowired
private TelemetrySubscriptionService tsService;

4
application/src/test/java/org/thingsboard/server/controller/BaseWidgetTypeControllerTest.java → application/src/test/java/org/thingsboard/server/controller/WidgetTypeControllerTest.java

@ -28,6 +28,7 @@ import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.common.data.widget.WidgetType;
import org.thingsboard.server.common.data.widget.WidgetTypeDetails;
import org.thingsboard.server.common.data.widget.WidgetsBundle;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.util.ArrayList;
import java.util.Collections;
@ -36,7 +37,8 @@ import java.util.List;
import static org.hamcrest.Matchers.containsString;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
public abstract class BaseWidgetTypeControllerTest extends AbstractControllerTest {
@DaoSqlTest
public class WidgetTypeControllerTest extends AbstractControllerTest {
private IdComparator<WidgetType> idComparator = new IdComparator<>();

146
application/src/test/java/org/thingsboard/server/controller/BaseWidgetsBundleControllerTest.java → application/src/test/java/org/thingsboard/server/controller/WidgetsBundleControllerTest.java

@ -21,16 +21,16 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import org.thingsboard.server.common.data.Customer;
import org.thingsboard.server.common.data.StringUtils;
import org.thingsboard.server.common.data.Tenant;
import org.thingsboard.server.common.data.User;
import org.thingsboard.server.common.data.audit.ActionType;
import org.thingsboard.server.common.data.id.CustomerId;
import org.thingsboard.server.common.data.page.PageData;
import org.thingsboard.server.common.data.page.PageLink;
import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.common.data.widget.WidgetsBundle;
import org.thingsboard.server.dao.exception.DataValidationException;
import org.thingsboard.server.dao.service.DaoSqlTest;
import java.util.ArrayList;
import java.util.Collections;
@ -38,9 +38,9 @@ import java.util.List;
import static org.hamcrest.Matchers.containsString;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.thingsboard.server.dao.model.ModelConstants.SYSTEM_TENANT;
public abstract class BaseWidgetsBundleControllerTest extends AbstractControllerTest {
@DaoSqlTest
public class WidgetsBundleControllerTest extends AbstractControllerTest {
private IdComparator<WidgetsBundle> idComparator = new IdComparator<>();
@ -70,7 +70,7 @@ public abstract class BaseWidgetsBundleControllerTest extends AbstractController
public void afterTest() throws Exception {
loginSysAdmin();
doDelete("/api/tenant/"+savedTenant.getId().getId().toString())
doDelete("/api/tenant/" + savedTenant.getId().getId().toString())
.andExpect(status().isOk());
}
@ -79,14 +79,14 @@ public abstract class BaseWidgetsBundleControllerTest extends AbstractController
WidgetsBundle widgetsBundle = new WidgetsBundle();
widgetsBundle.setTitle("My widgets bundle");
Mockito.reset(tbClusterService);
Mockito.reset(tbClusterService, auditLogService);
WidgetsBundle savedWidgetsBundle = doPost("/api/widgetsBundle", widgetsBundle, WidgetsBundle.class);
testNotifyManyEntityManyTimeMsgToEdgeServiceEntityEqAny(savedWidgetsBundle, savedWidgetsBundle,
savedTenant.getId(), tenantAdmin.getCustomerId(), tenantAdmin.getId(), tenantAdmin.getEmail(),
ActionType.ADDED, ActionType.ADDED, 0, 1, 0);
Mockito.reset(tbClusterService);
testNotifyEntityAllOneTime(savedWidgetsBundle, savedWidgetsBundle.getId(), savedWidgetsBundle.getId(), savedTenant.getId(),
tenantAdmin.getCustomerId(), tenantAdmin.getId(), tenantAdmin.getEmail(), ActionType.ADDED);
Mockito.reset(tbClusterService, auditLogService);
Assert.assertNotNull(savedWidgetsBundle);
Assert.assertNotNull(savedWidgetsBundle.getId());
@ -101,25 +101,26 @@ public abstract class BaseWidgetsBundleControllerTest extends AbstractController
WidgetsBundle foundWidgetsBundle = doGet("/api/widgetsBundle/" + savedWidgetsBundle.getId().getId().toString(), WidgetsBundle.class);
Assert.assertEquals(foundWidgetsBundle.getTitle(), savedWidgetsBundle.getTitle());
testNotifyManyEntityManyTimeMsgToEdgeServiceEntityEqAny(savedWidgetsBundle, savedWidgetsBundle,
savedTenant.getId(), tenantAdmin.getCustomerId(), tenantAdmin.getId(), tenantAdmin.getEmail(),
ActionType.UPDATED, ActionType.UPDATED, 0, 1, 0);
testNotifyEntityAllOneTime(savedWidgetsBundle, savedWidgetsBundle.getId(), savedWidgetsBundle.getId(), savedTenant.getId(),
tenantAdmin.getCustomerId(), tenantAdmin.getId(), tenantAdmin.getEmail(), ActionType.UPDATED);
}
@Test
public void testSaveWidgetBundleWithViolationOfLengthValidation() throws Exception {
WidgetsBundle widgetsBundle = new WidgetsBundle();
widgetsBundle.setTitle(StringUtils.randomAlphabetic(300));
@Test
public void testSaveWidgetBundleWithViolationOfLengthValidation() throws Exception {
WidgetsBundle widgetsBundle = new WidgetsBundle();
widgetsBundle.setTitle(StringUtils.randomAlphabetic(300));
Mockito.reset(tbClusterService);
Mockito.reset(tbClusterService, auditLogService);
String msgError = msgErrorFieldLength("title");
doPost("/api/widgetsBundle", widgetsBundle)
.andExpect(status().isBadRequest())
.andExpect(statusReason(containsString(msgError)));
String msgError = msgErrorFieldLength("title");
doPost("/api/widgetsBundle", widgetsBundle)
.andExpect(status().isBadRequest())
.andExpect(statusReason(containsString(msgError)));
testNotifyEntityNever(widgetsBundle.getId(), widgetsBundle);
}
testNotifyEntityEqualsOneTimeServiceNeverError(widgetsBundle, savedTenant.getId(),
tenantAdmin.getId(), tenantAdmin.getEmail(), ActionType.ADDED,
new DataValidationException("Validation error: title length must be equal or less than 255"));
}
@Test
public void testUpdateWidgetsBundleFromDifferentTenant() throws Exception {
@ -129,7 +130,7 @@ public abstract class BaseWidgetsBundleControllerTest extends AbstractController
loginDifferentTenant();
Mockito.reset(tbClusterService);
Mockito.reset(tbClusterService, auditLogService);
doPost("/api/widgetsBundle", savedWidgetsBundle)
.andExpect(status().isForbidden())
@ -155,26 +156,25 @@ public abstract class BaseWidgetsBundleControllerTest extends AbstractController
WidgetsBundle widgetsBundle = new WidgetsBundle();
widgetsBundle.setTitle("My widgets bundle");
Mockito.reset(tbClusterService, auditLogService);
WidgetsBundle savedWidgetsBundle = doPost("/api/widgetsBundle", widgetsBundle, WidgetsBundle.class);
doDelete("/api/widgetsBundle/"+savedWidgetsBundle.getId().getId().toString())
Mockito.reset(tbClusterService, auditLogService);
doDelete("/api/widgetsBundle/" + savedWidgetsBundle.getId().getId().toString())
.andExpect(status().isOk());
String savedWidgetsBundleIdStr = savedWidgetsBundle.getId().getId().toString();
testNotifyEntityAllOneTime(savedWidgetsBundle, savedWidgetsBundle.getId(), savedWidgetsBundle.getId(), savedTenant.getId(),
tenantAdmin.getCustomerId(), tenantAdmin.getId(), tenantAdmin.getEmail(), ActionType.DELETED);
doGet("/api/widgetsBundle/" + savedWidgetsBundleIdStr)
.andExpect(status().isNotFound())
.andExpect(statusReason(containsString(msgErrorNoFound("Widgets bundle", savedWidgetsBundleIdStr))));
testNotifyManyEntityManyTimeMsgToEdgeServiceEntityEqAny(savedWidgetsBundle, savedWidgetsBundle,
savedTenant.getId(), tenantAdmin.getCustomerId(), tenantAdmin.getId(), tenantAdmin.getEmail(),
ActionType.DELETED, ActionType.DELETED, 0, 1, 0);
}
@Test
public void testSaveWidgetsBundleWithEmptyTitle() throws Exception {
Mockito.reset(tbClusterService, auditLogService);
WidgetsBundle widgetsBundle = new WidgetsBundle();
@ -182,7 +182,9 @@ public abstract class BaseWidgetsBundleControllerTest extends AbstractController
.andExpect(status().isBadRequest())
.andExpect(statusReason(containsString("Widgets bundle title " + msgErrorShouldBeSpecified)));
testNotifyEntityNever(widgetsBundle.getId(), widgetsBundle);
testNotifyEntityEqualsOneTimeServiceNeverError(widgetsBundle, savedTenant.getId(),
tenantAdmin.getId(), tenantAdmin.getEmail(), ActionType.ADDED,
new DataValidationException("Widgets bundle title should be specified!"));
}
@Test
@ -192,13 +194,14 @@ public abstract class BaseWidgetsBundleControllerTest extends AbstractController
WidgetsBundle savedWidgetsBundle = doPost("/api/widgetsBundle", widgetsBundle, WidgetsBundle.class);
savedWidgetsBundle.setAlias("new_alias");
Mockito.clearInvocations(tbClusterService);
Mockito.reset(tbClusterService, auditLogService);
doPost("/api/widgetsBundle", savedWidgetsBundle)
.andExpect(status().isBadRequest())
.andExpect(statusReason(containsString("Update of widgets bundle alias is prohibited")));
testNotifyEntityNever(savedWidgetsBundle.getId(), savedWidgetsBundle);
testNotifyEntityEqualsOneTimeServiceNeverError(savedWidgetsBundle, savedTenant.getId(),
tenantAdmin.getId(), tenantAdmin.getEmail(), ActionType.UPDATED,
new DataValidationException("Update of widgets bundle alias is prohibited!"));
}
@Test
@ -207,22 +210,17 @@ public abstract class BaseWidgetsBundleControllerTest extends AbstractController
login(tenantAdmin.getEmail(), "testPassword1");
List<WidgetsBundle> sysWidgetsBundles = doGetTyped("/api/widgetsBundles?",
new TypeReference<>(){});
Mockito.reset(tbClusterService);
new TypeReference<>() {
});
int cntEntity = 73;
List<WidgetsBundle> widgetsBundles = new ArrayList<>();
for (int i=0;i<cntEntity;i++) {
for (int i = 0; i < cntEntity; i++) {
WidgetsBundle widgetsBundle = new WidgetsBundle();
widgetsBundle.setTitle("Widgets bundle"+i);
widgetsBundle.setTitle("Widgets bundle" + i);
widgetsBundles.add(doPost("/api/widgetsBundle", widgetsBundle, WidgetsBundle.class));
}
testNotifyManyEntityManyTimeMsgToEdgeServiceEntityEqAny(new WidgetsBundle(), new WidgetsBundle(),
savedTenant.getId(), tenantAdmin.getCustomerId(), tenantAdmin.getId(), tenantAdmin.getEmail(),
ActionType.ADDED, ActionType.ADDED, 0, cntEntity, 0);
widgetsBundles.addAll(sysWidgetsBundles);
List<WidgetsBundle> loadedWidgetsBundles = new ArrayList<>();
@ -230,7 +228,8 @@ public abstract class BaseWidgetsBundleControllerTest extends AbstractController
PageData<WidgetsBundle> pageData;
do {
pageData = doGetTypedWithPageLink("/api/widgetsBundles?",
new TypeReference<>(){}, pageLink);
new TypeReference<>() {
}, pageLink);
loadedWidgetsBundles.addAll(pageData.getData());
if (pageData.hasNext()) {
pageLink = pageLink.nextPageLink();
@ -249,13 +248,14 @@ public abstract class BaseWidgetsBundleControllerTest extends AbstractController
loginSysAdmin();
List<WidgetsBundle> sysWidgetsBundles = doGetTyped("/api/widgetsBundles?",
new TypeReference<>(){});
new TypeReference<>() {
});
int cntEntity = 120;
List<WidgetsBundle> createdWidgetsBundles = new ArrayList<>();
for (int i=0;i<cntEntity;i++) {
for (int i = 0; i < cntEntity; i++) {
WidgetsBundle widgetsBundle = new WidgetsBundle();
widgetsBundle.setTitle("Widgets bundle"+i);
widgetsBundle.setTitle("Widgets bundle" + i);
createdWidgetsBundles.add(doPost("/api/widgetsBundle", widgetsBundle, WidgetsBundle.class));
}
@ -267,7 +267,8 @@ public abstract class BaseWidgetsBundleControllerTest extends AbstractController
PageData<WidgetsBundle> pageData;
do {
pageData = doGetTypedWithPageLink("/api/widgetsBundles?",
new TypeReference<>(){}, pageLink);
new TypeReference<>() {
}, pageLink);
loadedWidgetsBundles.addAll(pageData.getData());
if (pageData.hasNext()) {
pageLink = pageLink.nextPageLink();
@ -279,22 +280,17 @@ public abstract class BaseWidgetsBundleControllerTest extends AbstractController
Assert.assertEquals(widgetsBundles, loadedWidgetsBundles);
Mockito.reset(tbClusterService);
for (WidgetsBundle widgetsBundle : createdWidgetsBundles) {
doDelete("/api/widgetsBundle/"+widgetsBundle.getId().getId().toString())
doDelete("/api/widgetsBundle/" + widgetsBundle.getId().getId().toString())
.andExpect(status().isOk());
}
testNotifyManyEntityManyTimeMsgToEdgeServiceEntityEqAny(new WidgetsBundle(), new WidgetsBundle(),
SYSTEM_TENANT, (CustomerId) createEntityId_NULL_UUID(new Customer()), null, SYS_ADMIN_EMAIL,
ActionType.DELETED, ActionType.DELETED, 0, cntEntity, 0);
pageLink = new PageLink(17);
loadedWidgetsBundles.clear();
do {
pageData = doGetTypedWithPageLink("/api/widgetsBundles?",
new TypeReference<PageData<WidgetsBundle>>(){}, pageLink);
new TypeReference<PageData<WidgetsBundle>>() {
}, pageLink);
loadedWidgetsBundles.addAll(pageData.getData());
if (pageData.hasNext()) {
pageLink = pageLink.nextPageLink();
@ -314,19 +310,21 @@ public abstract class BaseWidgetsBundleControllerTest extends AbstractController
login(tenantAdmin.getEmail(), "testPassword1");
List<WidgetsBundle> sysWidgetsBundles = doGetTyped("/api/widgetsBundles?",
new TypeReference<List<WidgetsBundle>>(){});
new TypeReference<List<WidgetsBundle>>() {
});
List<WidgetsBundle> widgetsBundles = new ArrayList<>();
for (int i=0;i<73;i++) {
for (int i = 0; i < 73; i++) {
WidgetsBundle widgetsBundle = new WidgetsBundle();
widgetsBundle.setTitle("Widgets bundle"+i);
widgetsBundle.setTitle("Widgets bundle" + i);
widgetsBundles.add(doPost("/api/widgetsBundle", widgetsBundle, WidgetsBundle.class));
}
widgetsBundles.addAll(sysWidgetsBundles);
List<WidgetsBundle> loadedWidgetsBundles = doGetTyped("/api/widgetsBundles?",
new TypeReference<>(){});
new TypeReference<>() {
});
Collections.sort(widgetsBundles, idComparator);
Collections.sort(loadedWidgetsBundles, idComparator);
@ -341,12 +339,13 @@ public abstract class BaseWidgetsBundleControllerTest extends AbstractController
List<WidgetsBundle> sysWidgetsBundles = doGetTyped("/api/widgetsBundles?",
new TypeReference<>(){});
new TypeReference<>() {
});
List<WidgetsBundle> createdSystemWidgetsBundles = new ArrayList<>();
for (int i=0;i<82;i++) {
for (int i = 0; i < 82; i++) {
WidgetsBundle widgetsBundle = new WidgetsBundle();
widgetsBundle.setTitle("Sys widgets bundle"+i);
widgetsBundle.setTitle("Sys widgets bundle" + i);
createdSystemWidgetsBundles.add(doPost("/api/widgetsBundle", widgetsBundle, WidgetsBundle.class));
}
@ -358,14 +357,15 @@ public abstract class BaseWidgetsBundleControllerTest extends AbstractController
login(tenantAdmin.getEmail(), "testPassword1");
for (int i=0;i<127;i++) {
for (int i = 0; i < 127; i++) {
WidgetsBundle widgetsBundle = new WidgetsBundle();
widgetsBundle.setTitle("Tenant widgets bundle"+i);
widgetsBundle.setTitle("Tenant widgets bundle" + i);
widgetsBundles.add(doPost("/api/widgetsBundle", widgetsBundle, WidgetsBundle.class));
}
List<WidgetsBundle> loadedWidgetsBundles = doGetTyped("/api/widgetsBundles?",
new TypeReference<List<WidgetsBundle>>(){});
new TypeReference<List<WidgetsBundle>>() {
});
Collections.sort(widgetsBundles, idComparator);
Collections.sort(loadedWidgetsBundles, idComparator);
@ -375,7 +375,8 @@ public abstract class BaseWidgetsBundleControllerTest extends AbstractController
loginSysAdmin();
loadedWidgetsBundles = doGetTyped("/api/widgetsBundles?",
new TypeReference<List<WidgetsBundle>>(){});
new TypeReference<>() {
});
Collections.sort(systemWidgetsBundles, idComparator);
Collections.sort(loadedWidgetsBundles, idComparator);
@ -383,12 +384,13 @@ public abstract class BaseWidgetsBundleControllerTest extends AbstractController
Assert.assertEquals(systemWidgetsBundles, loadedWidgetsBundles);
for (WidgetsBundle widgetsBundle : createdSystemWidgetsBundles) {
doDelete("/api/widgetsBundle/"+widgetsBundle.getId().getId().toString())
doDelete("/api/widgetsBundle/" + widgetsBundle.getId().getId().toString())
.andExpect(status().isOk());
}
loadedWidgetsBundles = doGetTyped("/api/widgetsBundles?",
new TypeReference<>(){});
new TypeReference<>() {
});
Collections.sort(sysWidgetsBundles, idComparator);
Collections.sort(loadedWidgetsBundles, idComparator);

26
application/src/test/java/org/thingsboard/server/controller/sql/AdminControllerSqlTest.java

@ -1,26 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseAdminControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
/**
* Created by Valerii Sosliuk on 6/28/2017.
*/
@DaoSqlTest
public class AdminControllerSqlTest extends BaseAdminControllerTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/AlarmCommentControllerSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseAlarmCommentControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class AlarmCommentControllerSqlTest extends BaseAlarmCommentControllerTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/AlarmControllerSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseAlarmControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class AlarmControllerSqlTest extends BaseAlarmControllerTest {
}

26
application/src/test/java/org/thingsboard/server/controller/sql/AssetControllerSqlTest.java

@ -1,26 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseAssetControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
/**
* Created by Valerii Sosliuk on 6/28/2017.
*/
@DaoSqlTest
public class AssetControllerSqlTest extends BaseAssetControllerTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/AssetProfileControllerSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseAssetProfileControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class AssetProfileControllerSqlTest extends BaseAssetProfileControllerTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/AuditLogControllerSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseAuditLogControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class AuditLogControllerSqlTest extends BaseAuditLogControllerTest {
}

26
application/src/test/java/org/thingsboard/server/controller/sql/AuthControllerSqlTest.java

@ -1,26 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseAuthControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
/**
* Created by Valerii Sosliuk on 6/28/2017.
*/
@DaoSqlTest
public class AuthControllerSqlTest extends BaseAuthControllerTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/ComponentDescriptorControllerSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseComponentDescriptorControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class ComponentDescriptorControllerSqlTest extends BaseComponentDescriptorControllerTest {
}

26
application/src/test/java/org/thingsboard/server/controller/sql/CustomerControllerSqlTest.java

@ -1,26 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseCustomerControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
/**
* Created by Valerii Sosliuk on 6/28/2017.
*/
@DaoSqlTest
public class CustomerControllerSqlTest extends BaseCustomerControllerTest {
}

26
application/src/test/java/org/thingsboard/server/controller/sql/DashboardControllerSqlTest.java

@ -1,26 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseDashboardControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
/**
* Created by Valerii Sosliuk on 6/28/2017.
*/
@DaoSqlTest
public class DashboardControllerSqlTest extends BaseDashboardControllerTest {
}

26
application/src/test/java/org/thingsboard/server/controller/sql/DeviceControllerSqlTest.java

@ -1,26 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseDeviceControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
/**
* Created by Valerii Sosliuk on 6/28/2017.
*/
@DaoSqlTest
public class DeviceControllerSqlTest extends BaseDeviceControllerTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/DeviceProfileControllerSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseDeviceProfileControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class DeviceProfileControllerSqlTest extends BaseDeviceProfileControllerTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/EdgeControllerSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseEdgeControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class EdgeControllerSqlTest extends BaseEdgeControllerTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/EdgeEventControllerSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseEdgeEventControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class EdgeEventControllerSqlTest extends BaseEdgeEventControllerTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/EntityQueryControllerSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseEntityQueryControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class EntityQueryControllerSqlTest extends BaseEntityQueryControllerTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/EntityRelationControllerSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseEntityRelationControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class EntityRelationControllerSqlTest extends BaseEntityRelationControllerTest {
}

26
application/src/test/java/org/thingsboard/server/controller/sql/EntityViewControllerSqlTest.java

@ -1,26 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseEntityViewControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
/**
* Created by Victor Basanets on 8/27/2017.
*/
@DaoSqlTest
public class EntityViewControllerSqlTest extends BaseEntityViewControllerTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/HomePageApiSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseHomePageApiTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class HomePageApiSqlTest extends BaseHomePageApiTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/OtaPackageControllerSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseOtaPackageControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class OtaPackageControllerSqlTest extends BaseOtaPackageControllerTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/RpcControllerTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseRpcControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class RpcControllerTest extends BaseRpcControllerTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/RuleChainControllerSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseRuleChainControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class RuleChainControllerSqlTest extends BaseRuleChainControllerTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/TbResourceControllerSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseTbResourceControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class TbResourceControllerSqlTest extends BaseTbResourceControllerTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/TelemetryControllerSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseTelemetryControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class TelemetryControllerSqlTest extends BaseTelemetryControllerTest {
}

26
application/src/test/java/org/thingsboard/server/controller/sql/TenantControllerSqlTest.java

@ -1,26 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseTenantControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
/**
* Created by Valerii Sosliuk on 6/28/2017.
*/
@DaoSqlTest
public class TenantControllerSqlTest extends BaseTenantControllerTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/TenantProfileControllerSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseTenantProfileControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class TenantProfileControllerSqlTest extends BaseTenantProfileControllerTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/TwoFactorAuthConfigSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.TwoFactorAuthConfigTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class TwoFactorAuthConfigSqlTest extends TwoFactorAuthConfigTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/TwoFactorAuthSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.TwoFactorAuthTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class TwoFactorAuthSqlTest extends TwoFactorAuthTest {
}

26
application/src/test/java/org/thingsboard/server/controller/sql/UserControllerSqlTest.java

@ -1,26 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseUserControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
/**
* Created by Valerii Sosliuk on 6/28/2017.
*/
@DaoSqlTest
public class UserControllerSqlTest extends BaseUserControllerTest {
}

23
application/src/test/java/org/thingsboard/server/controller/sql/WebsocketApiSqlTest.java

@ -1,23 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseWebsocketApiTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
@DaoSqlTest
public class WebsocketApiSqlTest extends BaseWebsocketApiTest {
}

26
application/src/test/java/org/thingsboard/server/controller/sql/WidgetTypeControllerSqlTest.java

@ -1,26 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseWidgetTypeControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
/**
* Created by Valerii Sosliuk on 6/28/2017.
*/
@DaoSqlTest
public class WidgetTypeControllerSqlTest extends BaseWidgetTypeControllerTest {
}

26
application/src/test/java/org/thingsboard/server/controller/sql/WidgetsBundleControllerSqlTest.java

@ -1,26 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.controller.sql;
import org.thingsboard.server.controller.BaseWidgetsBundleControllerTest;
import org.thingsboard.server.dao.service.DaoSqlTest;
/**
* Created by Valerii Sosliuk on 6/28/2017.
*/
@DaoSqlTest
public class WidgetsBundleControllerSqlTest extends BaseWidgetsBundleControllerTest {
}

4
application/src/test/java/org/thingsboard/server/edge/BaseAlarmEdgeTest.java → application/src/test/java/org/thingsboard/server/edge/AlarmEdgeTest.java

@ -29,6 +29,7 @@ import org.thingsboard.server.common.data.alarm.AlarmStatus;
import org.thingsboard.server.common.data.id.AlarmId;
import org.thingsboard.server.common.data.page.PageData;
import org.thingsboard.server.common.data.page.PageLink;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.gen.edge.v1.AlarmUpdateMsg;
import org.thingsboard.server.gen.edge.v1.UpdateMsgType;
import org.thingsboard.server.gen.edge.v1.UplinkMsg;
@ -39,7 +40,8 @@ import java.util.UUID;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
abstract public class BaseAlarmEdgeTest extends AbstractEdgeTest {
@DaoSqlTest
public class AlarmEdgeTest extends AbstractEdgeTest {
@Test
public void testSendAlarmToCloud() throws Exception {

4
application/src/test/java/org/thingsboard/server/edge/BaseAssetEdgeTest.java → application/src/test/java/org/thingsboard/server/edge/AssetEdgeTest.java

@ -23,6 +23,7 @@ import org.thingsboard.server.common.data.asset.Asset;
import org.thingsboard.server.common.data.edge.Edge;
import org.thingsboard.server.common.data.id.CustomerId;
import org.thingsboard.server.common.data.id.EntityId;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.gen.edge.v1.AssetProfileUpdateMsg;
import org.thingsboard.server.gen.edge.v1.AssetUpdateMsg;
import org.thingsboard.server.gen.edge.v1.UpdateMsgType;
@ -32,7 +33,8 @@ import java.util.UUID;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
abstract public class BaseAssetEdgeTest extends AbstractEdgeTest {
@DaoSqlTest
public class AssetEdgeTest extends AbstractEdgeTest {
@Test
public void testAssets() throws Exception {

4
application/src/test/java/org/thingsboard/server/edge/BaseAssetProfileEdgeTest.java → application/src/test/java/org/thingsboard/server/edge/AssetProfileEdgeTest.java

@ -21,6 +21,7 @@ import org.junit.Assert;
import org.junit.Test;
import org.thingsboard.server.common.data.asset.AssetProfile;
import org.thingsboard.server.common.data.id.RuleChainId;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.gen.edge.v1.AssetProfileUpdateMsg;
import org.thingsboard.server.gen.edge.v1.UpdateMsgType;
@ -28,7 +29,8 @@ import java.nio.charset.StandardCharsets;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
abstract public class BaseAssetProfileEdgeTest extends AbstractEdgeTest {
@DaoSqlTest
public class AssetProfileEdgeTest extends AbstractEdgeTest {
@Test
public void testAssetProfiles() throws Exception {

4
application/src/test/java/org/thingsboard/server/edge/BaseCustomerEdgeTest.java → application/src/test/java/org/thingsboard/server/edge/CustomerEdgeTest.java

@ -20,6 +20,7 @@ import org.junit.Assert;
import org.junit.Test;
import org.thingsboard.server.common.data.Customer;
import org.thingsboard.server.common.data.edge.Edge;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.gen.edge.v1.CustomerUpdateMsg;
import org.thingsboard.server.gen.edge.v1.EdgeConfiguration;
import org.thingsboard.server.gen.edge.v1.UpdateMsgType;
@ -28,7 +29,8 @@ import java.util.Optional;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
abstract public class BaseCustomerEdgeTest extends AbstractEdgeTest {
@DaoSqlTest
public class CustomerEdgeTest extends AbstractEdgeTest {
@Test
public void testCreateUpdateDeleteCustomer() throws Exception {

4
application/src/test/java/org/thingsboard/server/edge/BaseDashboardEdgeTest.java → application/src/test/java/org/thingsboard/server/edge/DashboardEdgeTest.java

@ -24,6 +24,7 @@ import org.thingsboard.server.common.data.Customer;
import org.thingsboard.server.common.data.Dashboard;
import org.thingsboard.server.common.data.ShortCustomerInfo;
import org.thingsboard.server.common.data.edge.Edge;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.gen.edge.v1.DashboardUpdateMsg;
import org.thingsboard.server.gen.edge.v1.UpdateMsgType;
@ -31,7 +32,8 @@ import java.util.Set;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
abstract public class BaseDashboardEdgeTest extends AbstractEdgeTest {
@DaoSqlTest
public class DashboardEdgeTest extends AbstractEdgeTest {
@Test
public void testDashboards() throws Exception {

4
application/src/test/java/org/thingsboard/server/edge/BaseDeviceEdgeTest.java → application/src/test/java/org/thingsboard/server/edge/DeviceEdgeTest.java

@ -52,6 +52,7 @@ import org.thingsboard.server.common.data.security.DeviceCredentialsType;
import org.thingsboard.server.common.data.tenant.profile.DefaultTenantProfileConfiguration;
import org.thingsboard.server.common.msg.session.FeatureType;
import org.thingsboard.server.common.transport.adaptor.JsonConverter;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.gen.edge.v1.AttributesRequestMsg;
import org.thingsboard.server.gen.edge.v1.DeviceCredentialsRequestMsg;
import org.thingsboard.server.gen.edge.v1.DeviceCredentialsUpdateMsg;
@ -79,7 +80,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
@TestPropertySource(properties = {
"transport.mqtt.enabled=true"
})
abstract public class BaseDeviceEdgeTest extends AbstractEdgeTest {
@DaoSqlTest
public class DeviceEdgeTest extends AbstractEdgeTest {
@Test
public void testDevices() throws Exception {

4
application/src/test/java/org/thingsboard/server/edge/BaseDeviceProfileEdgeTest.java → application/src/test/java/org/thingsboard/server/edge/DeviceProfileEdgeTest.java

@ -43,6 +43,7 @@ import org.thingsboard.server.common.data.ota.OtaPackageType;
import org.thingsboard.server.common.data.transport.snmp.SnmpMapping;
import org.thingsboard.server.common.data.transport.snmp.config.SnmpCommunicationConfig;
import org.thingsboard.server.common.data.transport.snmp.config.impl.TelemetryQueryingSnmpCommunicationConfig;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.gen.edge.v1.DeviceProfileUpdateMsg;
import org.thingsboard.server.gen.edge.v1.UpdateMsgType;
import org.thingsboard.server.transport.AbstractTransportIntegrationTest;
@ -54,7 +55,8 @@ import java.util.Optional;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
abstract public class BaseDeviceProfileEdgeTest extends AbstractEdgeTest {
@DaoSqlTest
public class DeviceProfileEdgeTest extends AbstractEdgeTest {
@Test
public void testDeviceProfiles() throws Exception {

4
application/src/test/java/org/thingsboard/server/edge/BaseEdgeTest.java → application/src/test/java/org/thingsboard/server/edge/EdgeTest.java

@ -21,6 +21,7 @@ import org.thingsboard.server.common.data.Customer;
import org.thingsboard.server.common.data.edge.Edge;
import org.thingsboard.server.common.data.id.CustomerId;
import org.thingsboard.server.common.data.id.EntityId;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.gen.edge.v1.CustomerUpdateMsg;
import org.thingsboard.server.gen.edge.v1.EdgeConfiguration;
import org.thingsboard.server.gen.edge.v1.UpdateMsgType;
@ -28,7 +29,8 @@ import org.thingsboard.server.gen.edge.v1.UpdateMsgType;
import java.util.Optional;
import java.util.UUID;
abstract public class BaseEdgeTest extends AbstractEdgeTest {
@DaoSqlTest
public class EdgeTest extends AbstractEdgeTest {
@Test
public void testEdge_assignToCustomer_unassignFromCustomer() throws Exception {

4
application/src/test/java/org/thingsboard/server/edge/BaseEntityViewEdgeTest.java → application/src/test/java/org/thingsboard/server/edge/EntityViewEdgeTest.java

@ -25,6 +25,7 @@ import org.thingsboard.server.common.data.EntityView;
import org.thingsboard.server.common.data.edge.Edge;
import org.thingsboard.server.common.data.id.CustomerId;
import org.thingsboard.server.common.data.id.EntityId;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.gen.edge.v1.EntityViewUpdateMsg;
import org.thingsboard.server.gen.edge.v1.EntityViewsRequestMsg;
import org.thingsboard.server.gen.edge.v1.UpdateMsgType;
@ -34,7 +35,8 @@ import java.util.UUID;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
abstract public class BaseEntityViewEdgeTest extends AbstractEdgeTest {
@DaoSqlTest
public class EntityViewEdgeTest extends AbstractEdgeTest {
@Test
public void testEntityViews() throws Exception {

4
application/src/test/java/org/thingsboard/server/edge/BaseOtaPackageEdgeTest.java → application/src/test/java/org/thingsboard/server/edge/OtaPackageEdgeTest.java

@ -27,6 +27,7 @@ import org.thingsboard.server.common.data.OtaPackageInfo;
import org.thingsboard.server.common.data.SaveOtaPackageInfoRequest;
import org.thingsboard.server.common.data.ota.ChecksumAlgorithm;
import org.thingsboard.server.common.data.ota.OtaPackageType;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.gen.edge.v1.OtaPackageUpdateMsg;
import org.thingsboard.server.gen.edge.v1.UpdateMsgType;
@ -35,7 +36,8 @@ import java.nio.ByteBuffer;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.thingsboard.server.common.data.ota.OtaPackageType.FIRMWARE;
abstract public class BaseOtaPackageEdgeTest extends AbstractEdgeTest {
@DaoSqlTest
public class OtaPackageEdgeTest extends AbstractEdgeTest {
@Test
public void testOtaPackages_usesUrl() throws Exception {

4
application/src/test/java/org/thingsboard/server/edge/BaseQueueEdgeTest.java → application/src/test/java/org/thingsboard/server/edge/QueueEdgeTest.java

@ -24,12 +24,14 @@ import org.thingsboard.server.common.data.queue.Queue;
import org.thingsboard.server.common.data.queue.SubmitStrategy;
import org.thingsboard.server.common.data.queue.SubmitStrategyType;
import org.thingsboard.server.common.msg.queue.ServiceType;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.gen.edge.v1.QueueUpdateMsg;
import org.thingsboard.server.gen.edge.v1.UpdateMsgType;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
abstract public class BaseQueueEdgeTest extends AbstractEdgeTest {
@DaoSqlTest
public class QueueEdgeTest extends AbstractEdgeTest {
@Test
public void testQueues() throws Exception {

4
application/src/test/java/org/thingsboard/server/edge/BaseRelationEdgeTest.java → application/src/test/java/org/thingsboard/server/edge/RelationEdgeTest.java

@ -24,6 +24,7 @@ import org.thingsboard.server.common.data.id.EntityId;
import org.thingsboard.server.common.data.id.EntityIdFactory;
import org.thingsboard.server.common.data.relation.EntityRelation;
import org.thingsboard.server.common.data.relation.RelationTypeGroup;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.gen.edge.v1.RelationRequestMsg;
import org.thingsboard.server.gen.edge.v1.RelationUpdateMsg;
import org.thingsboard.server.gen.edge.v1.UpdateMsgType;
@ -33,7 +34,8 @@ import java.util.UUID;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
abstract public class BaseRelationEdgeTest extends AbstractEdgeTest {
@DaoSqlTest
public class RelationEdgeTest extends AbstractEdgeTest {
@Test

4
application/src/test/java/org/thingsboard/server/edge/BaseRuleChainEdgeTest.java → application/src/test/java/org/thingsboard/server/edge/RuleChainEdgeTest.java

@ -24,6 +24,7 @@ import org.thingsboard.server.common.data.rule.RuleChain;
import org.thingsboard.server.common.data.rule.RuleChainMetaData;
import org.thingsboard.server.common.data.rule.RuleChainType;
import org.thingsboard.server.common.data.rule.RuleNode;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.gen.edge.v1.RuleChainMetadataRequestMsg;
import org.thingsboard.server.gen.edge.v1.RuleChainMetadataUpdateMsg;
import org.thingsboard.server.gen.edge.v1.RuleChainUpdateMsg;
@ -37,7 +38,8 @@ import java.util.UUID;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
abstract public class BaseRuleChainEdgeTest extends AbstractEdgeTest {
@DaoSqlTest
public class RuleChainEdgeTest extends AbstractEdgeTest {
@Test
public void testRuleChains() throws Exception {

4
application/src/test/java/org/thingsboard/server/edge/BaseTelemetryEdgeTest.java → application/src/test/java/org/thingsboard/server/edge/TelemetryEdgeTest.java

@ -30,6 +30,7 @@ import org.thingsboard.server.common.data.edge.EdgeEvent;
import org.thingsboard.server.common.data.edge.EdgeEventActionType;
import org.thingsboard.server.common.data.edge.EdgeEventType;
import org.thingsboard.server.common.data.id.EntityId;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.gen.edge.v1.AttributeDeleteMsg;
import org.thingsboard.server.gen.edge.v1.DeviceUpdateMsg;
import org.thingsboard.server.gen.edge.v1.EntityDataProto;
@ -39,7 +40,8 @@ import org.thingsboard.server.gen.transport.TransportProtos;
import java.util.List;
import java.util.concurrent.TimeUnit;
abstract public class BaseTelemetryEdgeTest extends AbstractEdgeTest {
@DaoSqlTest
public class TelemetryEdgeTest extends AbstractEdgeTest {
@Test
public void testTimeseriesWithFailures() throws Exception {

4
application/src/test/java/org/thingsboard/server/edge/BaseUserEdgeTest.java → application/src/test/java/org/thingsboard/server/edge/UserEdgeTest.java

@ -24,6 +24,7 @@ import org.thingsboard.server.common.data.Customer;
import org.thingsboard.server.common.data.User;
import org.thingsboard.server.common.data.edge.Edge;
import org.thingsboard.server.common.data.security.Authority;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.gen.edge.v1.UpdateMsgType;
import org.thingsboard.server.gen.edge.v1.UplinkMsg;
import org.thingsboard.server.gen.edge.v1.UserCredentialsRequestMsg;
@ -35,7 +36,8 @@ import java.util.Optional;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
abstract public class BaseUserEdgeTest extends AbstractEdgeTest {
@DaoSqlTest
public class UserEdgeTest extends AbstractEdgeTest {
@Autowired
private BCryptPasswordEncoder passwordEncoder;

4
application/src/test/java/org/thingsboard/server/edge/BaseWidgetEdgeTest.java → application/src/test/java/org/thingsboard/server/edge/WidgetEdgeTest.java

@ -22,13 +22,15 @@ import org.junit.Test;
import org.thingsboard.common.util.JacksonUtil;
import org.thingsboard.server.common.data.widget.WidgetType;
import org.thingsboard.server.common.data.widget.WidgetsBundle;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.gen.edge.v1.UpdateMsgType;
import org.thingsboard.server.gen.edge.v1.WidgetTypeUpdateMsg;
import org.thingsboard.server.gen.edge.v1.WidgetsBundleUpdateMsg;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
abstract public class BaseWidgetEdgeTest extends AbstractEdgeTest {
@DaoSqlTest
public class WidgetEdgeTest extends AbstractEdgeTest {
@Test
public void testWidgetsBundleAndWidgetType() throws Exception {

24
application/src/test/java/org/thingsboard/server/edge/sql/AlarmEdgeSqlTest.java

@ -1,24 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.edge.sql;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.edge.BaseAlarmEdgeTest;
@DaoSqlTest
public class AlarmEdgeSqlTest extends BaseAlarmEdgeTest {
}

24
application/src/test/java/org/thingsboard/server/edge/sql/AssetEdgeSqlTest.java

@ -1,24 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.edge.sql;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.edge.BaseAssetEdgeTest;
@DaoSqlTest
public class AssetEdgeSqlTest extends BaseAssetEdgeTest {
}

24
application/src/test/java/org/thingsboard/server/edge/sql/AssetProfileEdgeSqlTest.java

@ -1,24 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.edge.sql;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.edge.BaseAssetProfileEdgeTest;
@DaoSqlTest
public class AssetProfileEdgeSqlTest extends BaseAssetProfileEdgeTest {
}

24
application/src/test/java/org/thingsboard/server/edge/sql/CustomerEdgeSqlTest.java

@ -1,24 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.edge.sql;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.edge.BaseCustomerEdgeTest;
@DaoSqlTest
public class CustomerEdgeSqlTest extends BaseCustomerEdgeTest {
}

24
application/src/test/java/org/thingsboard/server/edge/sql/DashboardEdgeSqlTest.java

@ -1,24 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.edge.sql;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.edge.BaseDashboardEdgeTest;
@DaoSqlTest
public class DashboardEdgeSqlTest extends BaseDashboardEdgeTest {
}

24
application/src/test/java/org/thingsboard/server/edge/sql/DeviceEdgeSqlTest.java

@ -1,24 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.edge.sql;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.edge.BaseDeviceEdgeTest;
@DaoSqlTest
public class DeviceEdgeSqlTest extends BaseDeviceEdgeTest {
}

24
application/src/test/java/org/thingsboard/server/edge/sql/DeviceProfileEdgeSqlTest.java

@ -1,24 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.edge.sql;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.edge.BaseDeviceProfileEdgeTest;
@DaoSqlTest
public class DeviceProfileEdgeSqlTest extends BaseDeviceProfileEdgeTest {
}

24
application/src/test/java/org/thingsboard/server/edge/sql/EdgeSqlTest.java

@ -1,24 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.edge.sql;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.edge.BaseEdgeTest;
@DaoSqlTest
public class EdgeSqlTest extends BaseEdgeTest {
}

24
application/src/test/java/org/thingsboard/server/edge/sql/EntityViewEdgeSqlTest.java

@ -1,24 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.edge.sql;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.edge.BaseEntityViewEdgeTest;
@DaoSqlTest
public class EntityViewEdgeSqlTest extends BaseEntityViewEdgeTest {
}

24
application/src/test/java/org/thingsboard/server/edge/sql/OtaPackageEdgeSqlTest.java

@ -1,24 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.edge.sql;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.edge.BaseOtaPackageEdgeTest;
@DaoSqlTest
public class OtaPackageEdgeSqlTest extends BaseOtaPackageEdgeTest {
}

24
application/src/test/java/org/thingsboard/server/edge/sql/QueueEdgeSqlTest.java

@ -1,24 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.edge.sql;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.edge.BaseQueueEdgeTest;
@DaoSqlTest
public class QueueEdgeSqlTest extends BaseQueueEdgeTest {
}

24
application/src/test/java/org/thingsboard/server/edge/sql/RelationEdgeSqlTest.java

@ -1,24 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.edge.sql;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.edge.BaseRelationEdgeTest;
@DaoSqlTest
public class RelationEdgeSqlTest extends BaseRelationEdgeTest {
}

24
application/src/test/java/org/thingsboard/server/edge/sql/RuleChainEdgeSqlTest.java

@ -1,24 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.edge.sql;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.edge.BaseRuleChainEdgeTest;
@DaoSqlTest
public class RuleChainEdgeSqlTest extends BaseRuleChainEdgeTest {
}

24
application/src/test/java/org/thingsboard/server/edge/sql/TelemetryEdgeSqlTest.java

@ -1,24 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.edge.sql;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.edge.BaseTelemetryEdgeTest;
@DaoSqlTest
public class TelemetryEdgeSqlTest extends BaseTelemetryEdgeTest {
}

24
application/src/test/java/org/thingsboard/server/edge/sql/UserEdgeSqlTest.java

@ -1,24 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.edge.sql;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.edge.BaseUserEdgeTest;
@DaoSqlTest
public class UserEdgeSqlTest extends BaseUserEdgeTest {
}

24
application/src/test/java/org/thingsboard/server/edge/sql/WidgetEdgeSqlTest.java

@ -1,24 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.edge.sql;
import org.thingsboard.server.dao.service.DaoSqlTest;
import org.thingsboard.server.edge.BaseWidgetEdgeTest;
@DaoSqlTest
public class WidgetEdgeSqlTest extends BaseWidgetEdgeTest {
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save