From ce37fdb4be94219fd46494e6c5666386439f2e0e Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Thu, 6 Jul 2023 14:50:32 +0530 Subject: [PATCH] fixed unit tests --- .../pom.xml | 20 +- .../pom.xml | 34 + .../pom.xml | 29 + .../src/test/resources/conf/carbon.xml | 658 ------------------ .../test/resources/repository/conf/carbon.xml | 0 5 files changed, 81 insertions(+), 660 deletions(-) delete mode 100644 components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt/src/test/resources/conf/carbon.xml create mode 100644 components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt/src/test/resources/repository/conf/carbon.xml diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.defaultrole.manager/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.defaultrole.manager/pom.xml index 38ba36543d..7bd5e03b5b 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.defaultrole.manager/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.defaultrole.manager/pom.xml @@ -106,13 +106,19 @@ org.apache.maven.plugins maven-surefire-plugin + + --add-opens=java.xml/jdk.xml.internal=ALL-UNNAMED + --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED + - file:src/test/resources/carbon-home/repository/conf/log4j.properties - + file:src/test/resources/log4j.properties src/test/resources/testng.xml + + org.ops4j.pax.logging + @@ -207,5 +213,15 @@ org.wso2.orbit.javax.xml.bind jaxb-api + + com.sun.xml.bind + jaxb-core + test + + + com.sun.xml.bind + jaxb-impl + test + diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.type.deployer/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.type.deployer/pom.xml index 8b1dc93e22..16d45fccce 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.type.deployer/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.type.deployer/pom.xml @@ -104,6 +104,21 @@ io.entgra.device.mgt.core.device.mgt.core test + + org.mockito + mockito-core + test + + + com.sun.xml.bind + jaxb-core + test + + + com.sun.xml.bind + jaxb-impl + test + @@ -157,6 +172,25 @@ + + org.apache.maven.plugins + maven-surefire-plugin + + + --add-opens=java.xml/jdk.xml.internal=ALL-UNNAMED + --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED + + + file:src/test/resources/log4j.properties + + + src/test/resources/testng.xml + + + org.ops4j.pax.logging + + + org.jacoco jacoco-maven-plugin diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt/pom.xml index ed434c7873..ec115c2905 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt/pom.xml @@ -122,6 +122,16 @@ powermock-module-testng test + + org.wso2.carbon + org.wso2.carbon.securevault + test + + + org.mockito + mockito-core + test + @@ -189,6 +199,25 @@ + + org.apache.maven.plugins + maven-surefire-plugin + + + --add-opens=java.xml/jdk.xml.internal=ALL-UNNAMED + --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED + + + file:src/test/resources/log4j.properties + + + src/test/resources/testng.xml + + + org.ops4j.pax.logging + + + diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt/src/test/resources/conf/carbon.xml b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt/src/test/resources/conf/carbon.xml deleted file mode 100644 index a5518cb720..0000000000 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt/src/test/resources/conf/carbon.xml +++ /dev/null @@ -1,658 +0,0 @@ - - - - - - - - - ${product.name} - - - ${product.key} - - - ${product.version} - - - - - - - - - local:/${carbon.context}/services/ - - - - - - - ${default.server.role} - - - - - - - org.wso2.carbon - - - / - - - - - - - - - 15 - - - - - - - - - 0 - - - - - 9999 - - 11111 - - - - - - 10389 - - 8000 - - - - - - 10500 - - - - - - - org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory - - - - - - - - - java - - - - - - - - - - false - - - false - - - 600 - - - - false - - - - - - - - 30 - - - - - - - - - 15 - - - - - - ${carbon.home}/repository/deployment/server/ - - - 15 - - - ${carbon.home}/repository/conf/axis2/axis2.xml - - - 30000 - - - ${carbon.home}/repository/deployment/client/ - - ${carbon.home}/repository/conf/axis2/axis2_client.xml - - true - - - - - - - - - - admin - Default Administrator Role - - - user - Default User Role - - - - - - - - - - - - ${carbon.home}/repository/resources/security/wso2carbon.jks - - JKS - - wso2carbon - - wso2carbon - - wso2carbon - - - - - - ${carbon.home}/repository/resources/security/client-truststore.jks - - JKS - - wso2carbon - - - - - - - - - - - - - - - - - - - UserManager - - - false - - - - - - - ${carbon.home}/tmp/work - - - - - - true - - - 10 - - - 30 - - - - - - 100 - - - - keystore - certificate - * - - org.wso2.carbon.ui.transports.fileupload.AnyFileUploadExecutor - - - - - jarZip - - org.wso2.carbon.ui.transports.fileupload.JarZipUploadExecutor - - - - dbs - - org.wso2.carbon.ui.transports.fileupload.DBSFileUploadExecutor - - - - tools - - org.wso2.carbon.ui.transports.fileupload.ToolsFileUploadExecutor - - - - toolsAny - - org.wso2.carbon.ui.transports.fileupload.ToolsAnyFileUploadExecutor - - - - - - - info - org.wso2.carbon.core.transports.util.InfoProcessor - - - wsdl - org.wso2.carbon.core.transports.util.Wsdl11Processor - - - wsdl2 - org.wso2.carbon.core.transports.util.Wsdl20Processor - - - xsd - org.wso2.carbon.core.transports.util.XsdProcessor - - - - - - false - false - true - svn - http://svnrepo.example.com/repos/ - username - password - true - - - - - - - - - - - - - - - ${require.carbon.servlet} - - - - - true - - - - - - - default repository - ${p2.repo.url} - - - - - - - - true - - - - - - true - - diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt/src/test/resources/repository/conf/carbon.xml b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt/src/test/resources/repository/conf/carbon.xml new file mode 100644 index 0000000000..e69de29bb2