From fa41056a7bba0ade6909b1202ee4c562c285c884 Mon Sep 17 00:00:00 2001 From: dshvaika Date: Tue, 17 Nov 2026 10:45:27 +0200 Subject: [PATCH] IoT Hub tests: converters in the fixtures belong to the tenant Real converters always have a tenant id. The converter fixtures of DefaultIotHubServiceTest now set it, as the integration fixture already does. --- .../server/service/iot_hub/DefaultIotHubServiceTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/src/test/java/org/thingsboard/server/service/iot_hub/DefaultIotHubServiceTest.java b/application/src/test/java/org/thingsboard/server/service/iot_hub/DefaultIotHubServiceTest.java index a81368450c..27a75dbcd4 100644 --- a/application/src/test/java/org/thingsboard/server/service/iot_hub/DefaultIotHubServiceTest.java +++ b/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