Skip to content

Commit

Permalink
adding merge test for value policy
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Sep 12, 2023
1 parent 5a2352e commit e4fe7e9
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ public class SimpleObjectMergeOperation extends BaseMergeOperation<ObjectType> {
DashboardType.class,
UserType.class,
ArchetypeType.class,
MarkType.class
MarkType.class,
ObjectTemplateType.class,
ServiceType.class,
ValuePolicyType.class
);

public SimpleObjectMergeOperation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ public void test120MarkMergeOperation() throws Exception {
testMergeOperation("mark/mark-focus-deactivated");
}

@Test
public void test130ValuePolicyMergeOperation() throws Exception {
testMergeOperation("value-policy/value-policy");
}

private void testMergeOperation(String fileNamePrefix) throws IOException, SchemaException, ConfigurationException {
PrismObject<LookupTableType> source = getPrismContext().parseObject(new File(TEST_ROOT_DIR, fileNamePrefix + "-source.xml"));
PrismObject<LookupTableType> target = getPrismContext().parseObject(new File(TEST_ROOT_DIR, fileNamePrefix + "-target.xml"));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2010-2017 Evolveum and contributors
~
~ This work is dual-licensed under the Apache License 2.0
~ and European Union Public License. See LICENSE file for details.
-->
<valuePolicy oid="00000000-0000-0000-0000-000000000003"
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
version="0">
<name>
<t:orig>Default Password Policy</t:orig>
<t:norm>default password policy</t:norm>
</name>
<description>Default password policy</description>
<stringPolicy>
<description>Testing string policy Test change</description>
<limitations>
<minLength>10</minLength>
<minUniqueChars>3</minUniqueChars>
<checkAgainstDictionary>true</checkAgainstDictionary>
<checkPattern/>
</limitations>
</stringPolicy>
</valuePolicy>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2010-2017 Evolveum and contributors
~
~ This work is dual-licensed under the Apache License 2.0
~ and European Union Public License. See LICENSE file for details.
-->
<valuePolicy oid="00000000-0000-0000-0000-000000000003"
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
version="0">
<name>
<t:orig>Default Password Policy</t:orig>
<t:norm>default password policy</t:norm>
</name>
<description>Default password policy unmerged change</description>
<stringPolicy>
<description>Testing string policy test change</description>
<limitations>
<minLength>5</minLength>
<minUniqueChars>3</minUniqueChars>
<checkAgainstDictionary>true</checkAgainstDictionary>
<checkPattern/>
</limitations>
</stringPolicy>
</valuePolicy>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2010-2017 Evolveum and contributors
~
~ This work is dual-licensed under the Apache License 2.0
~ and European Union Public License. See LICENSE file for details.
-->
<valuePolicy oid="00000000-0000-0000-0000-000000000003"
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
version="0">
<name>
<t:orig>Default Password Policy</t:orig>
<t:norm>default password policy</t:norm>
</name>
<description>Default password policy</description>
<stringPolicy>
<description>Testing string policy Test change</description>
<limitations>
<minLength>10</minLength>
<minUniqueChars>3</minUniqueChars>
<checkAgainstDictionary>true</checkAgainstDictionary>
<checkPattern/>
</limitations>
</stringPolicy>
</valuePolicy>

0 comments on commit e4fe7e9

Please sign in to comment.