Browse Source
Merge pull request #15748 from dashevchenko/testFixes_2
Test fixes
pull/15767/head
Viacheslav Klimov
4 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
3 additions and
2 deletions
-
application/src/test/java/org/thingsboard/server/controller/HomePageApiTest.java
-
application/src/test/java/org/thingsboard/server/controller/UserControllerTest.java
|
|
|
@ -410,7 +410,7 @@ public class HomePageApiTest extends AbstractControllerTest { |
|
|
|
Assert.assertEquals(1, usageInfo.getCustomers()); |
|
|
|
Assert.assertEquals(configuration.getMaxCustomers(), usageInfo.getMaxCustomers()); |
|
|
|
|
|
|
|
Assert.assertEquals(2, usageInfo.getUsers()); |
|
|
|
Assert.assertEquals(3, usageInfo.getUsers()); |
|
|
|
Assert.assertEquals(configuration.getMaxUsers(), usageInfo.getMaxUsers()); |
|
|
|
|
|
|
|
Assert.assertEquals(DEFAULT_DASHBOARDS_COUNT, usageInfo.getDashboards()); |
|
|
|
@ -476,7 +476,7 @@ public class HomePageApiTest extends AbstractControllerTest { |
|
|
|
} |
|
|
|
|
|
|
|
usageInfo = doGet("/api/usage", UsageInfo.class); |
|
|
|
Assert.assertEquals(users.size() + 2, usageInfo.getUsers()); |
|
|
|
Assert.assertEquals(users.size() + 3, usageInfo.getUsers()); |
|
|
|
|
|
|
|
List<Dashboard> dashboards = new ArrayList<>(); |
|
|
|
for (int i = 0; i < 97; i++) { |
|
|
|
|
|
|
|
@ -682,6 +682,7 @@ public class UserControllerTest extends AbstractControllerTest { |
|
|
|
String email = "testEmail1"; |
|
|
|
List<UserId> expectedCustomerUserIds = new ArrayList<>(); |
|
|
|
expectedCustomerUserIds.add(customerUserId); |
|
|
|
expectedCustomerUserIds.add(secondCustomerUserId); |
|
|
|
for (int i = 0; i < 45; i++) { |
|
|
|
User customerUser = createCustomerUser(customerId); |
|
|
|
customerUser.setEmail(email + StringUtils.randomAlphanumeric((int) (5 + Math.random() * 10)) + "@thingsboard.org"); |
|
|
|
|