diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml index 3690a99648..415716e556 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml @@ -141,6 +141,9 @@ src/test/resources/testng.xml src/test/resources/mysql-testng.xml + src/test/resources/mssql-testng.xml + src/test/resources/oracle-testng.xml + src/test/resources/postgre-testng.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/mock/MockDatabaseMetaData.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/mock/MockDatabaseMetaData.java index 9662dd277a..2ab645ba9b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/mock/MockDatabaseMetaData.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/mock/MockDatabaseMetaData.java @@ -83,6 +83,12 @@ public class MockDatabaseMetaData implements DatabaseMetaData { return DeviceManagementConstants.DataBaseTypes.DB_TYPE_MYSQL; } else if (this.url.contains("h2")) { return DeviceManagementConstants.DataBaseTypes.DB_TYPE_H2; + } else if (this.url.contains("oracle")) { + return DeviceManagementConstants.DataBaseTypes.DB_TYPE_ORACLE; + } else if (this.url.contains("postgresql")) { + return DeviceManagementConstants.DataBaseTypes.DB_TYPE_POSTGRESQL; + } else if (this.url.contains("sqlserver")) { + return DeviceManagementConstants.DataBaseTypes.DB_TYPE_MSSQL; } else { return null; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/mssql/data-source-config-mock.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/mssql/data-source-config-mock.xml new file mode 100644 index 0000000000..bdd1fca814 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/mssql/data-source-config-mock.xml @@ -0,0 +1,33 @@ + + + + + jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks + org.wso2.carbon.device.mgt.core.mock.MockJDBCDriver + wso2carbon + wso2carbon + + + + + + + + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/mssql/data-source-config-no-table.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/mssql/data-source-config-no-table.xml new file mode 100644 index 0000000000..bdd1fca814 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/mssql/data-source-config-no-table.xml @@ -0,0 +1,33 @@ + + + + + jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks + org.wso2.carbon.device.mgt.core.mock.MockJDBCDriver + wso2carbon + wso2carbon + + + + + + + + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/mssql/data-source-config.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/mssql/data-source-config.xml new file mode 100644 index 0000000000..bdd1fca814 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/mssql/data-source-config.xml @@ -0,0 +1,33 @@ + + + + + jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks + org.wso2.carbon.device.mgt.core.mock.MockJDBCDriver + wso2carbon + wso2carbon + + + + + + + + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/oracle/data-source-config-mock.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/oracle/data-source-config-mock.xml new file mode 100644 index 0000000000..badd2738f2 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/oracle/data-source-config-mock.xml @@ -0,0 +1,33 @@ + + + + + jdbc:oracle:thin:@myhost:1521:orcl + org.wso2.carbon.device.mgt.core.mock.MockJDBCDriver + wso2carbon + wso2carbon + + + + + + + + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/oracle/data-source-config-no-table.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/oracle/data-source-config-no-table.xml new file mode 100644 index 0000000000..f5ec80f750 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/oracle/data-source-config-no-table.xml @@ -0,0 +1,33 @@ + + + + + jdbc:oracle:thin:@myhost:1521:orclt + org.wso2.carbon.device.mgt.core.mock.MockJDBCDriver + wso2carbon + wso2carbon + + + + + + + + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/oracle/data-source-config.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/oracle/data-source-config.xml new file mode 100644 index 0000000000..badd2738f2 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/oracle/data-source-config.xml @@ -0,0 +1,33 @@ + + + + + jdbc:oracle:thin:@myhost:1521:orcl + org.wso2.carbon.device.mgt.core.mock.MockJDBCDriver + wso2carbon + wso2carbon + + + + + + + + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/postgre/data-source-config-mock.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/postgre/data-source-config-mock.xml new file mode 100644 index 0000000000..e89ec94229 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/postgre/data-source-config-mock.xml @@ -0,0 +1,33 @@ + + + + + jdbc:mysql://localhost/test + org.wso2.carbon.device.mgt.core.mock.MockJDBCDriver + wso2carbon + wso2carbon + + + + + + + + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/postgre/data-source-config-no-table.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/postgre/data-source-config-no-table.xml new file mode 100644 index 0000000000..1f129e7e6e --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/postgre/data-source-config-no-table.xml @@ -0,0 +1,33 @@ + + + + + jdbc:mysql://localhost/noTableTest + org.wso2.carbon.device.mgt.core.mock.MockJDBCDriver + wso2carbon + wso2carbon + + + + + + + + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/postgre/data-source-config.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/postgre/data-source-config.xml new file mode 100644 index 0000000000..acd82eb55f --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/postgre/data-source-config.xml @@ -0,0 +1,33 @@ + + + + + jdbc:postgresql://localhost/test + org.wso2.carbon.device.mgt.core.mock.MockJDBCDriver + wso2carbon + wso2carbon + + + + + + + + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/mssql-testng.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/mssql-testng.xml new file mode 100644 index 0000000000..97cf287626 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/mssql-testng.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/oracle-testng.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/oracle-testng.xml new file mode 100644 index 0000000000..4199d5cb9a --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/oracle-testng.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/postgre-testng.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/postgre-testng.xml new file mode 100644 index 0000000000..150d654e6e --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/postgre-testng.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +