Started migration of integration tests to maven-failsafe-plugin
Former-commit-id: eb4ecf8b1a
pull/4/head
parent
cda9a839ab
commit
2d89f1f16a
|
|
@ -990,7 +990,15 @@
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-failsafe-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>integration-test</goal>
|
||||||
|
<goal>verify</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<forkMode>always</forkMode>
|
<forkMode>always</forkMode>
|
||||||
<forkCount>999</forkCount>
|
<forkCount>999</forkCount>
|
||||||
|
|
@ -999,10 +1007,6 @@
|
||||||
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
|
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
|
||||||
</systemPropertyVariables>
|
</systemPropertyVariables>
|
||||||
<redirectTestOutputToFile>false</redirectTestOutputToFile>
|
<redirectTestOutputToFile>false</redirectTestOutputToFile>
|
||||||
<groups>
|
|
||||||
org.libreccm.tests.categories.UnitTest,
|
|
||||||
org.libreccm.tests.categories.IntegrationTest
|
|
||||||
</groups>
|
|
||||||
<trimStackTrace>false</trimStackTrace>
|
<trimStackTrace>false</trimStackTrace>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
@ -1033,11 +1037,10 @@
|
||||||
<address>subsystem=datasources,data-source=ccm-core-testdb-h2-mem</address>
|
<address>subsystem=datasources,data-source=ccm-core-testdb-h2-mem</address>
|
||||||
<force>true</force>
|
<force>true</force>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<resource>
|
<resource>
|
||||||
<properties>
|
<properties>
|
||||||
<connection-url>jdbc:h2:mem:ccm-core-testdb</connection-url>
|
<connection-url>jdbc:h2:mem:ccm-core-testdb</connection-url>
|
||||||
<jndi-name>jndi-name="java:/comp/env/jdbc/org/libreccm/ccm-core/h2-mem</jndi-name>
|
<jndi-name>java:/comp/env/jdbc/org/libreccm/ccm-core/h2-mem</jndi-name>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
<user-name>sa</user-name>
|
<user-name>sa</user-name>
|
||||||
<password>sa</password>
|
<password>sa</password>
|
||||||
|
|
@ -1048,6 +1051,13 @@
|
||||||
</resources>
|
</resources>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>shutdown-test-env</id>
|
||||||
|
<goals>
|
||||||
|
<goal>shutdown</goal>
|
||||||
|
</goals>
|
||||||
|
<phase>post-integration-test</phase>
|
||||||
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ import com.arsdigita.bebop.tree.TreeNode;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.libreccm.cdi.utils.CdiUtil;
|
import org.libreccm.cdi.utils.CdiUtil;
|
||||||
import org.libreccm.l10n.GlobalizationHelper;
|
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
|
||||||
|
|
@ -1,154 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2015 LibreCCM Foundation.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
||||||
* MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
package com.arsdigita.kernel.security;
|
|
||||||
|
|
||||||
import com.arsdigita.util.JavaPropertyReader;
|
|
||||||
import com.arsdigita.util.parameter.AbstractParameter;
|
|
||||||
import com.arsdigita.web.CCMApplicationContextListener;
|
|
||||||
import com.arsdigita.xml.XML;
|
|
||||||
import com.arsdigita.xml.formatters.DateFormatter;
|
|
||||||
|
|
||||||
import static org.hamcrest.Matchers.*;
|
|
||||||
|
|
||||||
import org.jboss.arquillian.container.test.api.Deployment;
|
|
||||||
import org.jboss.arquillian.junit.Arquillian;
|
|
||||||
import org.jboss.shrinkwrap.api.ShrinkWrap;
|
|
||||||
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
|
|
||||||
import org.jboss.shrinkwrap.api.spec.WebArchive;
|
|
||||||
import org.junit.After;
|
|
||||||
import org.junit.AfterClass;
|
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
import static org.libreccm.testutils.DependenciesHelpers.*;
|
|
||||||
|
|
||||||
import org.junit.Before;
|
|
||||||
import org.junit.BeforeClass;
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.junit.runner.RunWith;
|
|
||||||
import org.libreccm.categorization.Categorization;
|
|
||||||
import org.libreccm.core.CcmObject;
|
|
||||||
import org.libreccm.jpa.EntityManagerProducer;
|
|
||||||
import org.libreccm.jpa.utils.UriConverter;
|
|
||||||
import org.libreccm.l10n.LocalizedString;
|
|
||||||
import org.libreccm.security.PermissionChecker;
|
|
||||||
import org.libreccm.tests.categories.IntegrationTest;
|
|
||||||
import org.libreccm.web.ApplicationRepository;
|
|
||||||
import org.libreccm.workflow.Workflow;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
|
||||||
*/
|
|
||||||
@RunWith(Arquillian.class)
|
|
||||||
//@Category(IntegrationTest.class)
|
|
||||||
public class SecurityConfigTest {
|
|
||||||
|
|
||||||
public SecurityConfigTest() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@BeforeClass
|
|
||||||
public static void setUpClass() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@AfterClass
|
|
||||||
public static void tearDownClass() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Before
|
|
||||||
public void setUp() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@After
|
|
||||||
public void tearDown() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deployment
|
|
||||||
public static WebArchive createDeployment() {
|
|
||||||
return ShrinkWrap
|
|
||||||
.create(WebArchive.class,
|
|
||||||
"LibreCCM-com.arsdigita.kernel.security.SecurityConfigTest.war")
|
|
||||||
.addPackage(CcmObject.class.getPackage())
|
|
||||||
.addPackage(Categorization.class.getPackage())
|
|
||||||
.addPackage(PermissionChecker.class.getPackage())
|
|
||||||
.addPackage(LocalizedString.class.getPackage())
|
|
||||||
.addPackage(Workflow.class.getPackage())
|
|
||||||
.addPackage(UriConverter.class.getPackage())
|
|
||||||
.addPackage(ApplicationRepository.class.getPackage())
|
|
||||||
.addPackage(EntityManagerProducer.class.getPackage())
|
|
||||||
.addPackage(SecurityConfig.class.getPackage())
|
|
||||||
.addPackage(AbstractParameter.class.getPackage())
|
|
||||||
.addPackage(JavaPropertyReader.class.getPackage())
|
|
||||||
.addPackage(CCMApplicationContextListener.class.getPackage())
|
|
||||||
.addPackage(XML.class.getPackage())
|
|
||||||
.addPackage(DateFormatter.class.getPackage())
|
|
||||||
.addPackage(IntegrationTest.class.getPackage())
|
|
||||||
.addAsLibraries(getModuleDependencies())
|
|
||||||
.addAsResource(
|
|
||||||
"configs/com/arsdigita/kernel/security/SecurityConfigTest/ccm-core.config",
|
|
||||||
"ccm-core.config")
|
|
||||||
.addAsWebInfResource(
|
|
||||||
"configs/com/arsdigita/kernel/security/SecurityConfigTest/registry.properties",
|
|
||||||
"conf/registry/registry.properties")
|
|
||||||
.addAsWebInfResource(
|
|
||||||
"configs/com/arsdigita/kernel/security/SecurityConfigTest/kernel.properties",
|
|
||||||
"conf/registry/ccm-core/kernel.properties")
|
|
||||||
.addAsWebInfResource(
|
|
||||||
"configs/com/arsdigita/kernel/security/SecurityConfigTest/security.properties",
|
|
||||||
"conf/registry/ccm-core/security.properties")
|
|
||||||
.addAsResource(
|
|
||||||
"com/arsdigita/kernel/KernelConfig_parameter.properties",
|
|
||||||
"com/arsdigita/kernel/KernelConfig_parameter.properties")
|
|
||||||
.addAsResource(
|
|
||||||
"com/arsdigita/kernel/security/SecurityConfig_parameter.properties",
|
|
||||||
"com/arsdigita/kernel/security/SecurityConfig_parameter.properties")
|
|
||||||
.addAsResource("test-persistence.xml",
|
|
||||||
"META-INF/persistence.xml")
|
|
||||||
.addAsWebInfResource("test-web.xml", "WEB-INF/web.xml")
|
|
||||||
.addAsResource("configs/shiro.ini", "shiro.ini")
|
|
||||||
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void verifySecurityConfig() {
|
|
||||||
final SecurityConfig securityConfig = SecurityConfig.getConfig();
|
|
||||||
|
|
||||||
final List<String> excludedExtensions = securityConfig
|
|
||||||
.getExcludedExtensions();
|
|
||||||
assertThat(excludedExtensions.size(), is(4));
|
|
||||||
assertThat(excludedExtensions.get(0), is(equalTo(".jpg")));
|
|
||||||
assertThat(excludedExtensions.get(1), is(equalTo(".gif")));
|
|
||||||
assertThat(excludedExtensions.get(2), is(equalTo(".png")));
|
|
||||||
assertThat(excludedExtensions.get(3), is(equalTo(".pdf")));
|
|
||||||
|
|
||||||
assertThat(securityConfig.isAutoRegistrationEnabled(), is(false));
|
|
||||||
|
|
||||||
assertThat(securityConfig.isPasswordRecoveryEnabled(), is(true));
|
|
||||||
|
|
||||||
assertThat(securityConfig.getHashAlgorithm(), is(equalTo("SHA-512")));
|
|
||||||
|
|
||||||
assertThat(securityConfig.getSaltLength(), is(256));
|
|
||||||
|
|
||||||
assertThat(securityConfig.getHashIterations(), is(50000));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -42,7 +42,6 @@ import org.junit.runner.RunWith;
|
||||||
import org.libreccm.core.CcmObject;
|
import org.libreccm.core.CcmObject;
|
||||||
import org.libreccm.core.CcmObjectRepository;
|
import org.libreccm.core.CcmObjectRepository;
|
||||||
import org.libreccm.security.Shiro;
|
import org.libreccm.security.Shiro;
|
||||||
import org.libreccm.tests.categories.IntegrationTest;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -66,7 +65,6 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@org.junit.experimental.categories.Category(IntegrationTest.class)
|
|
||||||
@RunWith(Arquillian.class)
|
@RunWith(Arquillian.class)
|
||||||
@PersistenceTest
|
@PersistenceTest
|
||||||
@Transactional(TransactionMode.COMMIT)
|
@Transactional(TransactionMode.COMMIT)
|
||||||
|
|
@ -75,7 +73,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
||||||
"003_init_hibernate_sequence.sql"})
|
"003_init_hibernate_sequence.sql"})
|
||||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||||
phase = TestExecutionPhase.BEFORE)
|
phase = TestExecutionPhase.BEFORE)
|
||||||
public class CategoryManagerTest {
|
public class CategoryManagerIT {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private CategoryRepository categoryRepo;
|
private CategoryRepository categoryRepo;
|
||||||
|
|
@ -101,7 +99,7 @@ public class CategoryManagerTest {
|
||||||
@PersistenceContext(name = "LibreCCM")
|
@PersistenceContext(name = "LibreCCM")
|
||||||
private EntityManager entityManager;
|
private EntityManager entityManager;
|
||||||
|
|
||||||
public CategoryManagerTest() {
|
public CategoryManagerIT() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
|
|
@ -139,8 +137,6 @@ public class CategoryManagerTest {
|
||||||
.getPackage())
|
.getPackage())
|
||||||
.addPackage(org.libreccm.testutils.EqualsVerifier.class
|
.addPackage(org.libreccm.testutils.EqualsVerifier.class
|
||||||
.getPackage())
|
.getPackage())
|
||||||
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
|
|
||||||
.getPackage())
|
|
||||||
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
|
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
|
||||||
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
||||||
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
|
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
|
||||||
|
|
@ -45,7 +45,6 @@ import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.libreccm.security.Shiro;
|
import org.libreccm.security.Shiro;
|
||||||
import org.libreccm.tests.categories.IntegrationTest;
|
|
||||||
|
|
||||||
import static org.hamcrest.Matchers.*;
|
import static org.hamcrest.Matchers.*;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
@ -55,13 +54,13 @@ import static org.libreccm.testutils.DependenciesHelpers.*;
|
||||||
import org.jboss.arquillian.persistence.CleanupUsingScript;
|
import org.jboss.arquillian.persistence.CleanupUsingScript;
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import org.jboss.arquillian.persistence.TestExecutionPhase;
|
import org.jboss.arquillian.persistence.TestExecutionPhase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@org.junit.experimental.categories.Category(IntegrationTest.class)
|
|
||||||
@RunWith(Arquillian.class)
|
@RunWith(Arquillian.class)
|
||||||
@PersistenceTest
|
@PersistenceTest
|
||||||
@Transactional(TransactionMode.COMMIT)
|
@Transactional(TransactionMode.COMMIT)
|
||||||
|
|
@ -70,7 +69,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
||||||
"003_init_hibernate_sequence.sql"})
|
"003_init_hibernate_sequence.sql"})
|
||||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||||
phase = TestExecutionPhase.BEFORE)
|
phase = TestExecutionPhase.BEFORE)
|
||||||
public class CategoryRepositoryTest {
|
public class CategoryRepositoryIT {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private CategoryRepository categoryRepo;
|
private CategoryRepository categoryRepo;
|
||||||
|
|
@ -87,7 +86,7 @@ public class CategoryRepositoryTest {
|
||||||
@PersistenceContext(name = "LibreCCM")
|
@PersistenceContext(name = "LibreCCM")
|
||||||
private EntityManager entityManager;
|
private EntityManager entityManager;
|
||||||
|
|
||||||
public CategoryRepositoryTest() {
|
public CategoryRepositoryIT() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
|
|
@ -125,8 +124,6 @@ public class CategoryRepositoryTest {
|
||||||
.getPackage())
|
.getPackage())
|
||||||
.addPackage(org.libreccm.testutils.EqualsVerifier.class
|
.addPackage(org.libreccm.testutils.EqualsVerifier.class
|
||||||
.getPackage())
|
.getPackage())
|
||||||
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
|
|
||||||
.getPackage())
|
|
||||||
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
|
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
|
||||||
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
||||||
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
|
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
|
||||||
|
|
@ -40,10 +40,8 @@ import org.junit.AfterClass;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.experimental.categories.Category;
|
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.libreccm.security.Shiro;
|
import org.libreccm.security.Shiro;
|
||||||
import org.libreccm.tests.categories.IntegrationTest;
|
|
||||||
|
|
||||||
import static org.hamcrest.Matchers.*;
|
import static org.hamcrest.Matchers.*;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
@ -58,7 +56,6 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@Category(IntegrationTest.class)
|
|
||||||
@RunWith(Arquillian.class)
|
@RunWith(Arquillian.class)
|
||||||
@PersistenceTest
|
@PersistenceTest
|
||||||
@Transactional(TransactionMode.COMMIT)
|
@Transactional(TransactionMode.COMMIT)
|
||||||
|
|
@ -67,7 +64,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
||||||
"003_init_hibernate_sequence.sql"})
|
"003_init_hibernate_sequence.sql"})
|
||||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||||
phase = TestExecutionPhase.BEFORE)
|
phase = TestExecutionPhase.BEFORE)
|
||||||
public class ConfigurationManagerTest {
|
public class ConfigurationManagerIT {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ConfigurationManager configurationManager;
|
private ConfigurationManager configurationManager;
|
||||||
|
|
@ -75,7 +72,7 @@ public class ConfigurationManagerTest {
|
||||||
@Inject
|
@Inject
|
||||||
private Shiro shiro;
|
private Shiro shiro;
|
||||||
|
|
||||||
public ConfigurationManagerTest() {
|
public ConfigurationManagerIT() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -115,8 +112,6 @@ public class ConfigurationManagerTest {
|
||||||
.addPackage(org.libreccm.security.Permission.class.getPackage())
|
.addPackage(org.libreccm.security.Permission.class.getPackage())
|
||||||
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
|
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
|
||||||
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
||||||
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
|
|
||||||
.getPackage())
|
|
||||||
.addPackage(org.libreccm.testutils.EqualsVerifier.class.
|
.addPackage(org.libreccm.testutils.EqualsVerifier.class.
|
||||||
getPackage())
|
getPackage())
|
||||||
.addClass(com.example.TestConfiguration.class)
|
.addClass(com.example.TestConfiguration.class)
|
||||||
|
|
@ -38,9 +38,7 @@ import org.junit.AfterClass;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.experimental.categories.Category;
|
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.libreccm.tests.categories.IntegrationTest;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -55,6 +53,7 @@ import static org.libreccm.testutils.DependenciesHelpers.*;
|
||||||
import org.jboss.arquillian.persistence.CleanupUsingScript;
|
import org.jboss.arquillian.persistence.CleanupUsingScript;
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import org.jboss.arquillian.persistence.TestExecutionPhase;
|
import org.jboss.arquillian.persistence.TestExecutionPhase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -63,7 +62,6 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@Category(IntegrationTest.class)
|
|
||||||
@RunWith(Arquillian.class)
|
@RunWith(Arquillian.class)
|
||||||
@PersistenceTest
|
@PersistenceTest
|
||||||
@Transactional(TransactionMode.COMMIT)
|
@Transactional(TransactionMode.COMMIT)
|
||||||
|
|
@ -72,7 +70,7 @@ import org.jboss.arquillian.persistence.TestExecutionPhase;
|
||||||
"003_init_hibernate_sequence.sql"})
|
"003_init_hibernate_sequence.sql"})
|
||||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||||
phase = TestExecutionPhase.BEFORE)
|
phase = TestExecutionPhase.BEFORE)
|
||||||
public class CcmObjectRepositoryTest {
|
public class CcmObjectRepositoryIT {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private CcmObjectRepository ccmObjectRepository;
|
private CcmObjectRepository ccmObjectRepository;
|
||||||
|
|
@ -80,7 +78,7 @@ public class CcmObjectRepositoryTest {
|
||||||
@PersistenceContext(name = "LibreCCM")
|
@PersistenceContext(name = "LibreCCM")
|
||||||
private EntityManager entityManager;
|
private EntityManager entityManager;
|
||||||
|
|
||||||
public CcmObjectRepositoryTest() {
|
public CcmObjectRepositoryIT() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
|
|
@ -127,8 +125,6 @@ public class CcmObjectRepositoryTest {
|
||||||
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
|
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
|
||||||
.addPackage(org.libreccm.testutils.EqualsVerifier.class.
|
.addPackage(org.libreccm.testutils.EqualsVerifier.class.
|
||||||
getPackage())
|
getPackage())
|
||||||
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
|
|
||||||
.getPackage())
|
|
||||||
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
|
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
|
||||||
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
||||||
.addPackage(com.arsdigita.kernel.security.SecurityConfig.class
|
.addPackage(com.arsdigita.kernel.security.SecurityConfig.class
|
||||||
|
|
@ -44,7 +44,6 @@ import org.libreccm.configuration.ConfigurationManager;
|
||||||
import org.libreccm.core.UnexpectedErrorException;
|
import org.libreccm.core.UnexpectedErrorException;
|
||||||
import org.libreccm.files.CcmFilesConfiguration;
|
import org.libreccm.files.CcmFilesConfiguration;
|
||||||
import org.libreccm.security.Shiro;
|
import org.libreccm.security.Shiro;
|
||||||
import org.libreccm.tests.categories.IntegrationTest;
|
|
||||||
|
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
@ -68,7 +67,6 @@ import static org.junit.Assert.*;
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@Category(IntegrationTest.class)
|
|
||||||
@RunWith(Arquillian.class)
|
@RunWith(Arquillian.class)
|
||||||
@PersistenceTest
|
@PersistenceTest
|
||||||
@Transactional(TransactionMode.COMMIT)
|
@Transactional(TransactionMode.COMMIT)
|
||||||
|
|
@ -77,7 +75,7 @@ import static org.junit.Assert.*;
|
||||||
"003_init_hibernate_sequence.sql"})
|
"003_init_hibernate_sequence.sql"})
|
||||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||||
phase = TestExecutionPhase.BEFORE)
|
phase = TestExecutionPhase.BEFORE)
|
||||||
public class GroupImportTest {
|
public class GroupImportIT {
|
||||||
|
|
||||||
private static final String IMPORT_MANIFEST_SOURCE = "/imports"
|
private static final String IMPORT_MANIFEST_SOURCE = "/imports"
|
||||||
+ "/org.libreccm.imexport.GroupImportTest"
|
+ "/org.libreccm.imexport.GroupImportTest"
|
||||||
|
|
@ -108,7 +106,7 @@ public class GroupImportTest {
|
||||||
@Inject
|
@Inject
|
||||||
private Shiro shiro;
|
private Shiro shiro;
|
||||||
|
|
||||||
public GroupImportTest() {
|
public GroupImportIT() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -135,7 +133,7 @@ public class GroupImportTest {
|
||||||
|
|
||||||
if (Files.exists(ccmTestsDirPath)) {
|
if (Files.exists(ccmTestsDirPath)) {
|
||||||
Files.walkFileTree(ccmTestsDirPath,
|
Files.walkFileTree(ccmTestsDirPath,
|
||||||
new GroupImportTest.DeleteDirectoryVisitor());
|
new GroupImportIT.DeleteDirectoryVisitor());
|
||||||
}
|
}
|
||||||
|
|
||||||
Files.createDirectory(ccmTestsDirPath);
|
Files.createDirectory(ccmTestsDirPath);
|
||||||
|
|
@ -229,8 +227,6 @@ public class GroupImportTest {
|
||||||
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
||||||
.addPackage(org.libreccm.testutils.EqualsVerifier.class
|
.addPackage(org.libreccm.testutils.EqualsVerifier.class
|
||||||
.getPackage())
|
.getPackage())
|
||||||
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
|
|
||||||
.getPackage())
|
|
||||||
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
|
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
|
||||||
.addClass(com.arsdigita.kernel.KernelConfig.class)
|
.addClass(com.arsdigita.kernel.KernelConfig.class)
|
||||||
.addAsLibraries(getModuleDependencies())
|
.addAsLibraries(getModuleDependencies())
|
||||||
|
|
@ -44,7 +44,6 @@ import org.libreccm.configuration.ConfigurationManager;
|
||||||
import org.libreccm.core.UnexpectedErrorException;
|
import org.libreccm.core.UnexpectedErrorException;
|
||||||
import org.libreccm.files.CcmFilesConfiguration;
|
import org.libreccm.files.CcmFilesConfiguration;
|
||||||
import org.libreccm.security.Shiro;
|
import org.libreccm.security.Shiro;
|
||||||
import org.libreccm.tests.categories.IntegrationTest;
|
|
||||||
|
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
@ -68,7 +67,6 @@ import static org.junit.Assert.*;
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@Category(IntegrationTest.class)
|
|
||||||
@RunWith(Arquillian.class)
|
@RunWith(Arquillian.class)
|
||||||
@PersistenceTest
|
@PersistenceTest
|
||||||
@Transactional(TransactionMode.COMMIT)
|
@Transactional(TransactionMode.COMMIT)
|
||||||
|
|
@ -77,7 +75,7 @@ import static org.junit.Assert.*;
|
||||||
"003_init_hibernate_sequence.sql"})
|
"003_init_hibernate_sequence.sql"})
|
||||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||||
phase = TestExecutionPhase.BEFORE)
|
phase = TestExecutionPhase.BEFORE)
|
||||||
public class GroupMembershipImportTest {
|
public class GroupMembershipImportIT {
|
||||||
|
|
||||||
private static final String IMPORT_MANIFEST_SOURCE = "/imports"
|
private static final String IMPORT_MANIFEST_SOURCE = "/imports"
|
||||||
+ "/org.libreccm.imexport.GroupMembershipImportTest"
|
+ "/org.libreccm.imexport.GroupMembershipImportTest"
|
||||||
|
|
@ -109,7 +107,7 @@ public class GroupMembershipImportTest {
|
||||||
@Inject
|
@Inject
|
||||||
private Shiro shiro;
|
private Shiro shiro;
|
||||||
|
|
||||||
public GroupMembershipImportTest() {
|
public GroupMembershipImportIT() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -233,8 +231,6 @@ public class GroupMembershipImportTest {
|
||||||
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
||||||
.addPackage(org.libreccm.testutils.EqualsVerifier.class
|
.addPackage(org.libreccm.testutils.EqualsVerifier.class
|
||||||
.getPackage())
|
.getPackage())
|
||||||
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
|
|
||||||
.getPackage())
|
|
||||||
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
|
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
|
||||||
.addClass(com.arsdigita.kernel.KernelConfig.class)
|
.addClass(com.arsdigita.kernel.KernelConfig.class)
|
||||||
.addAsLibraries(getModuleDependencies())
|
.addAsLibraries(getModuleDependencies())
|
||||||
|
|
@ -44,7 +44,6 @@ import org.libreccm.configuration.ConfigurationManager;
|
||||||
import org.libreccm.core.UnexpectedErrorException;
|
import org.libreccm.core.UnexpectedErrorException;
|
||||||
import org.libreccm.files.CcmFilesConfiguration;
|
import org.libreccm.files.CcmFilesConfiguration;
|
||||||
import org.libreccm.security.Shiro;
|
import org.libreccm.security.Shiro;
|
||||||
import org.libreccm.tests.categories.IntegrationTest;
|
|
||||||
|
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
@ -68,7 +67,6 @@ import static org.junit.Assert.*;
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@Category(IntegrationTest.class)
|
|
||||||
@RunWith(Arquillian.class)
|
@RunWith(Arquillian.class)
|
||||||
@PersistenceTest
|
@PersistenceTest
|
||||||
@Transactional(TransactionMode.COMMIT)
|
@Transactional(TransactionMode.COMMIT)
|
||||||
|
|
@ -77,7 +75,7 @@ import static org.junit.Assert.*;
|
||||||
"003_init_hibernate_sequence.sql"})
|
"003_init_hibernate_sequence.sql"})
|
||||||
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
@CleanupUsingScript(value = {"999_cleanup.sql"},
|
||||||
phase = TestExecutionPhase.BEFORE)
|
phase = TestExecutionPhase.BEFORE)
|
||||||
public class UserImportTest {
|
public class UserImportIT {
|
||||||
|
|
||||||
private static final String IMPORT_MANIFEST_SOURCE = "/imports"
|
private static final String IMPORT_MANIFEST_SOURCE = "/imports"
|
||||||
+ "/org.libreccm.imexport.UserImportTest"
|
+ "/org.libreccm.imexport.UserImportTest"
|
||||||
|
|
@ -108,7 +106,7 @@ public class UserImportTest {
|
||||||
@Inject
|
@Inject
|
||||||
private Shiro shiro;
|
private Shiro shiro;
|
||||||
|
|
||||||
public UserImportTest() {
|
public UserImportIT() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -228,8 +226,6 @@ public class UserImportTest {
|
||||||
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
||||||
.addPackage(org.libreccm.testutils.EqualsVerifier.class
|
.addPackage(org.libreccm.testutils.EqualsVerifier.class
|
||||||
.getPackage())
|
.getPackage())
|
||||||
.addPackage(org.libreccm.tests.categories.IntegrationTest.class
|
|
||||||
.getPackage())
|
|
||||||
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
|
.addClass(com.arsdigita.kernel.security.SecurityConfig.class)
|
||||||
.addClass(com.arsdigita.kernel.KernelConfig.class)
|
.addClass(com.arsdigita.kernel.KernelConfig.class)
|
||||||
.addAsLibraries(getModuleDependencies())
|
.addAsLibraries(getModuleDependencies())
|
||||||
5
pom.xml
5
pom.xml
|
|
@ -242,6 +242,11 @@
|
||||||
<artifactId>maven-release-plugin</artifactId>
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
<version>2.5.3</version>
|
<version>2.5.3</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-failsafe-plugin</artifactId>
|
||||||
|
<version>3.0.0-M5</version>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue