CCM NG/ccm-cms: Fixed typo in after-add-role dataset.
CCM NG/ccm-shortcuts: - Necssary changes due to changed permission behaviour (only in the test datasets). - ccm-shortcuts now uses standard cleanup procedure between integratio tests git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4542 8810af33-2d31-482b-a856-94f89814c4df
parent
255516772f
commit
f74bfb2618
|
|
@ -927,5 +927,26 @@
|
||||||
creation_date="2016-07-15"
|
creation_date="2016-07-15"
|
||||||
inherited="true"
|
inherited="true"
|
||||||
inherited_from_id="-1100" />
|
inherited_from_id="-1100" />
|
||||||
|
<ccm_core.permissions permission_id="-40000000"
|
||||||
|
granted_privilege="view_published_items"
|
||||||
|
object_id="-11001"
|
||||||
|
grantee_id="-3700"
|
||||||
|
creation_date="2016-07-15"
|
||||||
|
inherited="true"
|
||||||
|
inherited_from_id="-1100" />
|
||||||
|
<ccm_core.permissions permission_id="-41000000"
|
||||||
|
granted_privilege="preview_items"
|
||||||
|
object_id="-11001"
|
||||||
|
grantee_id="-3700"
|
||||||
|
creation_date="2016-07-15"
|
||||||
|
inherited="true"
|
||||||
|
inherited_from_id="-1100" />
|
||||||
|
<ccm_core.permissions permission_id="-42000000"
|
||||||
|
granted_privilege="approve_items"
|
||||||
|
object_id="-11001"
|
||||||
|
grantee_id="-3700"
|
||||||
|
creation_date="2016-07-15"
|
||||||
|
inherited="true"
|
||||||
|
inherited_from_id="-1100" />
|
||||||
|
|
||||||
</dataset>
|
</dataset>
|
||||||
|
|
@ -32,6 +32,7 @@ import org.jboss.arquillian.container.test.api.Deployment;
|
||||||
import org.jboss.arquillian.container.test.api.ShouldThrowException;
|
import org.jboss.arquillian.container.test.api.ShouldThrowException;
|
||||||
import org.jboss.arquillian.junit.Arquillian;
|
import org.jboss.arquillian.junit.Arquillian;
|
||||||
import org.jboss.arquillian.junit.InSequence;
|
import org.jboss.arquillian.junit.InSequence;
|
||||||
|
import org.jboss.arquillian.persistence.CleanupUsingScript;
|
||||||
import org.jboss.arquillian.persistence.CreateSchema;
|
import org.jboss.arquillian.persistence.CreateSchema;
|
||||||
import org.jboss.arquillian.persistence.PersistenceTest;
|
import org.jboss.arquillian.persistence.PersistenceTest;
|
||||||
import org.jboss.arquillian.persistence.ShouldMatchDataSet;
|
import org.jboss.arquillian.persistence.ShouldMatchDataSet;
|
||||||
|
|
@ -62,6 +63,7 @@ import static org.junit.Assert.*;
|
||||||
@PersistenceTest
|
@PersistenceTest
|
||||||
@Transactional(TransactionMode.COMMIT)
|
@Transactional(TransactionMode.COMMIT)
|
||||||
@CreateSchema({"create_ccm_shortcuts_schema.sql"})
|
@CreateSchema({"create_ccm_shortcuts_schema.sql"})
|
||||||
|
@CleanupUsingScript({"cleanup.sql"})
|
||||||
public class ShortcutManagerTest {
|
public class ShortcutManagerTest {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ import static org.libreccm.testutils.DependenciesHelpers.*;
|
||||||
import org.jboss.arquillian.container.test.api.Deployment;
|
import org.jboss.arquillian.container.test.api.Deployment;
|
||||||
import org.jboss.arquillian.junit.Arquillian;
|
import org.jboss.arquillian.junit.Arquillian;
|
||||||
import org.jboss.arquillian.junit.InSequence;
|
import org.jboss.arquillian.junit.InSequence;
|
||||||
|
import org.jboss.arquillian.persistence.CleanupUsingScript;
|
||||||
import org.jboss.arquillian.persistence.CreateSchema;
|
import org.jboss.arquillian.persistence.CreateSchema;
|
||||||
import org.jboss.arquillian.persistence.PersistenceTest;
|
import org.jboss.arquillian.persistence.PersistenceTest;
|
||||||
import org.jboss.arquillian.persistence.UsingDataSet;
|
import org.jboss.arquillian.persistence.UsingDataSet;
|
||||||
|
|
@ -58,6 +59,7 @@ import static org.junit.Assert.*;
|
||||||
@PersistenceTest
|
@PersistenceTest
|
||||||
@Transactional(TransactionMode.COMMIT)
|
@Transactional(TransactionMode.COMMIT)
|
||||||
@CreateSchema({"create_ccm_shortcuts_schema.sql"})
|
@CreateSchema({"create_ccm_shortcuts_schema.sql"})
|
||||||
|
@CleanupUsingScript({"cleanup.sql"})
|
||||||
public class ShortcutRepositoryTest {
|
public class ShortcutRepositoryTest {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
Disable automatic cleanup, does not work because of referential
|
Disable automatic cleanup, does not work because of referential
|
||||||
integrity constrains.
|
integrity constrains.
|
||||||
-->
|
-->
|
||||||
<property name="defaultCleanupPhase">NONE</property>
|
<!--<property name="defaultCleanupPhase">NONE</property>-->
|
||||||
|
|
||||||
<property name="dumpData">true</property>
|
<property name="dumpData">true</property>
|
||||||
<property name="dumpDirectory">target</property>
|
<property name="dumpDirectory">target</property>
|
||||||
|
|
@ -32,9 +32,9 @@
|
||||||
<property name="qualifiedTableNames">true</property>
|
<property name="qualifiedTableNames">true</property>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
<extension qualifier="persistence-script">
|
<!--<extension qualifier="persistence-script">
|
||||||
<property name="scriptsToExecuteAfterTest">scripts/h2-cleanup.sql</property>
|
<property name="scriptsToExecuteAfterTest">scripts/h2-cleanup.sql</property>
|
||||||
</extension>
|
</extension>-->
|
||||||
|
|
||||||
|
|
||||||
</arquillian>
|
</arquillian>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
DELETE FROM ccm_shortcuts.shortcuts;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings_string_list;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings_l10n_str_values;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings_enum_values;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings_enum_values;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.categorizations;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.category_domains;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.categories;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.permissions;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.ccm_objects;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.role_memberships;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.group_memberships;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.groups;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.one_time_auth_tokens;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.users;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.user_email_addresses;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.parties;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.ccm_roles;
|
||||||
|
|
||||||
|
ALTER SEQUENCE hibernate_sequence RESTART WITH 1;
|
||||||
|
|
@ -1246,4 +1246,3 @@ create sequence hibernate_sequence start with 1 increment by 1;
|
||||||
|
|
||||||
alter table CCM_SHORTCUTS.SHORTCUTS
|
alter table CCM_SHORTCUTS.SHORTCUTS
|
||||||
add constraint UK_4otuwtog6qqdbg4e6p8xdpw8h unique (URL_KEY);
|
add constraint UK_4otuwtog6qqdbg4e6p8xdpw8h unique (URL_KEY);
|
||||||
create sequence hibernate_sequence start with 1 increment by 1;
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
Disable automatic cleanup, does not work because of referential
|
Disable automatic cleanup, does not work because of referential
|
||||||
integrity constrains.
|
integrity constrains.
|
||||||
-->
|
-->
|
||||||
<property name="defaultCleanupPhase">NONE</property>
|
<!--<property name="defaultCleanupPhase">NONE</property>-->
|
||||||
|
|
||||||
<property name="dumpData">true</property>
|
<property name="dumpData">true</property>
|
||||||
<property name="dumpDirectory">target</property>
|
<property name="dumpDirectory">target</property>
|
||||||
|
|
@ -26,14 +26,14 @@
|
||||||
|
|
||||||
<extension qualifier="persistence-dbunit">
|
<extension qualifier="persistence-dbunit">
|
||||||
<property name="defaultDataSetFormat">json</property>
|
<property name="defaultDataSetFormat">json</property>
|
||||||
<!--<property name="datatypeFactory">org.dbunit.ext.h2.H2DataTypeFactory</property>-->
|
<property name="datatypeFactory">org.dbunit.ext.postgresql.PostgresqlDataTypeFactory</property>
|
||||||
<property name="excludePoi">true</property>
|
<property name="excludePoi">true</property>
|
||||||
<property name="qualifiedTableNames">true</property>
|
<property name="qualifiedTableNames">true</property>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
<extension qualifier="persistence-script">
|
<!--<extension qualifier="persistence-script">
|
||||||
<property name="scriptsToExecuteAfterTest">scripts/pgsql-cleanup.sql</property>
|
<property name="scriptsToExecuteAfterTest">scripts/pgsql-cleanup.sql</property>
|
||||||
</extension>
|
</extension>-->
|
||||||
|
|
||||||
|
|
||||||
</arquillian>
|
</arquillian>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
DELETE FROM ccm_shortcuts.shortcuts;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings_string_list;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings_l10n_str_values;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings_enum_values;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings_enum_values;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.categorizations;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.category_domains;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.categories;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.permissions;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.ccm_objects;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.role_memberships;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.group_memberships;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.groups;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.one_time_auth_tokens;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.users;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.user_email_addresses;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.parties;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.ccm_roles;
|
||||||
|
|
||||||
|
ALTER SEQUENCE hibernate_sequence RESTART;
|
||||||
|
|
@ -1246,4 +1246,4 @@ create sequence hibernate_sequence start 1 increment 1;
|
||||||
|
|
||||||
alter table CCM_SHORTCUTS.SHORTCUTS
|
alter table CCM_SHORTCUTS.SHORTCUTS
|
||||||
add constraint UK_4otuwtog6qqdbg4e6p8xdpw8h unique (URL_KEY);
|
add constraint UK_4otuwtog6qqdbg4e6p8xdpw8h unique (URL_KEY);
|
||||||
create sequence hibernate_sequence start 1 increment 1;
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,8 @@
|
||||||
|
|
||||||
<ccm_core.permissions permission_id="-400"
|
<ccm_core.permissions permission_id="-400"
|
||||||
granted_privilege="manage_shortcuts"
|
granted_privilege="manage_shortcuts"
|
||||||
grantee_id="-200" />
|
grantee_id="-200"
|
||||||
|
inherited="false" />
|
||||||
|
|
||||||
<ccm_shortcuts.shortcuts shortcut_id="-10"
|
<ccm_shortcuts.shortcuts shortcut_id="-10"
|
||||||
url_key="/mitglieder/"
|
url_key="/mitglieder/"
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,8 @@
|
||||||
|
|
||||||
<ccm_core.permissions permission_id="-400"
|
<ccm_core.permissions permission_id="-400"
|
||||||
granted_privilege="manage_shortcuts"
|
granted_privilege="manage_shortcuts"
|
||||||
grantee_id="-200" />
|
grantee_id="-200"
|
||||||
|
inherited="false" />
|
||||||
|
|
||||||
<ccm_shortcuts.shortcuts shortcut_id="-10"
|
<ccm_shortcuts.shortcuts shortcut_id="-10"
|
||||||
url_key="/mitglieder/"
|
url_key="/mitglieder/"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue