diff --git a/application/src/test/java/org/thingsboard/server/controller/QrCodeSettingsControllerTest.java b/application/src/test/java/org/thingsboard/server/controller/QrCodeSettingsControllerTest.java index c2e2b953b2..15fe14f895 100644 --- a/application/src/test/java/org/thingsboard/server/controller/QrCodeSettingsControllerTest.java +++ b/application/src/test/java/org/thingsboard/server/controller/QrCodeSettingsControllerTest.java @@ -53,7 +53,8 @@ public class QrCodeSettingsControllerTest extends AbstractControllerTest { @Before public void setUp() throws Exception { - loginSysAdmin(); + // Deep link host is derived from the login white-labeling base URL; start from system defaults + resetSysAdminWhiteLabelingSettings(); MobileApp androidApp = validMobileApp( "my.android.package", PlatformType.ANDROID); StoreInfo androidStoreInfo = StoreInfo.builder() diff --git a/application/src/test/java/org/thingsboard/server/controller/WhiteLabelingControllerTest.java b/application/src/test/java/org/thingsboard/server/controller/WhiteLabelingControllerTest.java index 83eb9384bf..8574bd7bd0 100644 --- a/application/src/test/java/org/thingsboard/server/controller/WhiteLabelingControllerTest.java +++ b/application/src/test/java/org/thingsboard/server/controller/WhiteLabelingControllerTest.java @@ -36,7 +36,11 @@ public class WhiteLabelingControllerTest extends AbstractControllerTest { WhiteLabelingDao whiteLabelingDao; @After - public void afterTest() { + public void afterTest() throws Exception { + // System-level login/white-labeling params are shared by every test class in the same DB; + // restore defaults so the base URL set here (e.g. "https://domain.com") does not leak. + resetSysAdminWhiteLabelingSettings(); + if (tenantId != null) { WhiteLabelingCompositeKey key = new WhiteLabelingCompositeKey(tenantId, WhiteLabelingType.MAIL_TEMPLATES); if (whiteLabelingDao.findById(SYS_TENANT_ID, key) != null) {