Initialize OperationManagementDAOFactory with data source

pull/422/head
Nipuni Kavindya 5 months ago
parent 6c92c626af
commit 998b4e2c7c

@ -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);

@ -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 {

Loading…
Cancel
Save