Fixed test failure in ccm-shortcuts

ccm-docs
Jens Pelzetter 2020-07-18 09:52:49 +02:00
parent 377513fed7
commit 9f6f894929
5 changed files with 64 additions and 28 deletions

View File

@ -61,6 +61,26 @@
<artifactId>hibernate-validator</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator-cdi</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search-orm</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-xml-provider</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>

View File

@ -107,7 +107,27 @@ public class ShortcutManagerIT {
return ShrinkWrap.create(
WebArchive.class,
"LibreCCM-org.libreccm.shortcuts.ShortcutTest-web.war")
.addPackages(true, "com.arsdigita", "org.libreccm")
.addPackage(org.libreccm.auditing.CcmRevision.class.getPackage())
.addPackage(org.libreccm.categorization.Categorization.class
.getPackage())
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
.addPackage(org.libreccm.configuration.Configuration.class
.getPackage())
.addPackage(org.libreccm.core.CcmCore.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class
.getPackage())
.addPackage(org.libreccm.security.Permission.class.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
.getPackage())
.addClass(com.arsdigita.kernel.KernelConfig.class)
.addClass(org.libreccm.imexport.Exportable.class)
.addClass(org.libreccm.shortcuts.Shortcut.class)
.addClass(org.libreccm.shortcuts.ShortcutManager.class)
.addClass(org.libreccm.shortcuts.ShortcutRepository.class)
.addAsLibraries(getModuleDependencies())
.addAsLibraries(getCcmCoreDependencies())
.addAsResource("configs/shiro.ini", "shiro.ini")

View File

@ -19,6 +19,7 @@
package org.libreccm.shortcuts;
import static org.libreccm.testutils.DependenciesHelpers.getCcmCoreDependencies;
import static org.libreccm.testutils.DependenciesHelpers.getModuleDependencies;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
@ -105,8 +106,25 @@ public class ShortcutRepositoryIT {
WebArchive.class,
"LibreCCM-org.libreccm.shortcuts.ShortcutRepositoryTest-web.war"
)
.addPackages(true, "com.arsdigita", "org.libreccm")
//.addAsLibraries(getModuleDependencies())
.addPackage(org.libreccm.auditing.CcmRevision.class.getPackage())
.addPackage(org.libreccm.categorization.Categorization.class
.getPackage())
.addPackage(org.libreccm.configuration.Configuration.class
.getPackage())
.addPackage(org.libreccm.core.CcmCore.class.getPackage())
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
.getPackage())
.addPackage(org.libreccm.l10n.LocalizedString.class
.getPackage())
.addPackage(org.libreccm.security.Permission.class.getPackage())
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
.getPackage())
.addClass(org.libreccm.imexport.Exportable.class)
.addClass(org.libreccm.shortcuts.Shortcut.class)
.addClass(org.libreccm.shortcuts.ShortcutRepository.class)
.addAsLibraries(getModuleDependencies())
.addAsLibraries(getCcmCoreDependencies())
.addAsResource(
"test-persistence.xml", "META-INF/persistence.xml"

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/application_7.xsd" version="7">
<display-name>ccm-bundle-shortcuts-test-wildfly</display-name>
<module>
<web>
<web-uri>LibreCCM-org.libreccm.shortcuts.ShortcutTest-web.war</web-uri>
<context-root>/libreccm-shortcuts-test</context-root>
</web>
</module>
<library-directory>lib</library-directory>
</application>

View File

@ -1,11 +0,0 @@
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
bean-discovery-mode="annotated">
<interceptors>
<class>org.libreccm.security.AuthorizationInterceptor</class>
</interceptors>
</beans>