From 998b4e2c7ce787863ba88342f51fa97b2a9e0f2e Mon Sep 17 00:00:00 2001 From: nipuni Date: Wed, 19 Jun 2024 07:36:51 +0530 Subject: [PATCH] Initialize OperationManagementDAOFactory with data source --- .../device/mgt/core/application/mgt/core/BaseTestCase.java | 2 ++ .../mgt/extensions/device/type/template/BaseExtensionsTest.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/test/java/io/entgra/device/mgt/core/application/mgt/core/BaseTestCase.java b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/test/java/io/entgra/device/mgt/core/application/mgt/core/BaseTestCase.java index 9243cb8930..7251a0d19e 100644 --- a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/test/java/io/entgra/device/mgt/core/application/mgt/core/BaseTestCase.java +++ b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/test/java/io/entgra/device/mgt/core/application/mgt/core/BaseTestCase.java @@ -37,6 +37,7 @@ import io.entgra.device.mgt.core.device.mgt.core.config.DeviceConfigurationManag import io.entgra.device.mgt.core.device.mgt.core.dao.DeviceManagementDAOFactory; import io.entgra.device.mgt.core.device.mgt.core.internal.DeviceManagementDataHolder; import io.entgra.device.mgt.core.device.mgt.core.metadata.mgt.dao.MetadataManagementDAOFactory; +import io.entgra.device.mgt.core.device.mgt.core.operation.mgt.dao.OperationManagementDAOFactory; import org.wso2.carbon.registry.core.config.RegistryContext; import org.wso2.carbon.registry.core.exceptions.RegistryException; import org.wso2.carbon.registry.core.internal.RegistryDataHolder; @@ -96,6 +97,7 @@ public abstract class BaseTestCase { ConnectionManagerUtil.init(dataSource); DeviceManagementDAOFactory.init(dataSource); MetadataManagementDAOFactory.init(dataSource); + OperationManagementDAOFactory.init(dataSource); // PolicyManagementDAOFactory.init(dataSource); // OperationManagementDAOFactory.init(dataSource); // GroupManagementDAOFactory.init(dataSource); diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/src/test/java/io/entgra/device/mgt/core/device/mgt/extensions/device/type/template/BaseExtensionsTest.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/src/test/java/io/entgra/device/mgt/core/device/mgt/extensions/device/type/template/BaseExtensionsTest.java index aff8d17eda..992969aa92 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/src/test/java/io/entgra/device/mgt/core/device/mgt/extensions/device/type/template/BaseExtensionsTest.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/src/test/java/io/entgra/device/mgt/core/device/mgt/extensions/device/type/template/BaseExtensionsTest.java @@ -18,6 +18,7 @@ package io.entgra.device.mgt.core.device.mgt.extensions.device.type.template; +import io.entgra.device.mgt.core.device.mgt.core.operation.mgt.dao.OperationManagementDAOFactory; import org.apache.tomcat.jdbc.pool.PoolProperties; import org.mockito.Mockito; import org.testng.annotations.BeforeSuite; @@ -131,6 +132,7 @@ public class BaseExtensionsTest { readDataSourceConfig(datasourceLocation + DATASOURCE_EXT)); DeviceManagementDAOFactory.init(dataSource); MetadataManagementDAOFactory.init(dataSource); + OperationManagementDAOFactory.init(dataSource); } protected DataSourceConfig readDataSourceConfig(String configLocation) throws DeviceManagementException {