Browse Source
Merge pull request #16739 from ShvaykaD/fix/lts-4.4/iot-hub-test-converter-fixtures
IoT Hub tests: converters in the fixtures belong to the tenant
pull/16747/head
Viacheslav Klimov
2 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
0 deletions
-
application/src/test/java/org/thingsboard/server/service/iot_hub/DefaultIotHubServiceTest.java
|
|
|
@ -467,6 +467,7 @@ class DefaultIotHubServiceTest { |
|
|
|
profile.setDefaultDashboardId(dashboard.getId()); |
|
|
|
Integration integration = new Integration(new IntegrationId(UUID.randomUUID())); |
|
|
|
Converter converter = new Converter(new ConverterId(UUID.randomUUID())); |
|
|
|
converter.setTenantId(tenantId); |
|
|
|
// The profile and the integration listed first: in reverse order of creation, the dashboard would go before the
|
|
|
|
// profile that refers to it, and the converter before the integration that uses it.
|
|
|
|
IotHubInstalledItem deleted = devicePackage(profile.getId(), dashboard.getId(), integration.getId(), converter.getId()); |
|
|
|
@ -604,6 +605,7 @@ class DefaultIotHubServiceTest { |
|
|
|
mockTenant(); |
|
|
|
IntegrationId integrationId = new IntegrationId(UUID.randomUUID()); |
|
|
|
Converter converter = new Converter(new ConverterId(UUID.randomUUID())); |
|
|
|
converter.setTenantId(tenantId); |
|
|
|
when(converterService.findConverterById(tenantId, converter.getId())).thenReturn(converter); |
|
|
|
IotHubInstalledItem deleted = devicePackage(converter.getId(), integrationId); |
|
|
|
// The converter and the integration steps shared the name: the integration's state replaced the converter's
|
|
|
|
|