Skip to content

Commit

Permalink
Extended provisioning entitlement tests. Fixed model-intest TestIgnor…
Browse files Browse the repository at this point in the history
…eCase.
  • Loading branch information
semancik committed Aug 25, 2015
1 parent 853936e commit 772d97d
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 3 deletions.
Expand Up @@ -22,7 +22,7 @@
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">
<name>JOKER</name>
<resourceRef oid="10000000-0000-0000-0000-000000000004"/>
<resourceRef oid="10000000-0000-0000-0000-000000001204"/>
<objectClass>ri:GroupObjectClass</objectClass>
<kind>entitlement</kind>
<intent>group</intent>
Expand Down
Expand Up @@ -290,6 +290,10 @@
<intent>group</intent>
<default>true</default>
<objectClass>ri:GroupObjectClass</objectClass>
<attribute>
<ref>icfs:uid</ref>
<matchingRule>mr:stringIgnoreCase</matchingRule>
</attribute>
<attribute>
<ref>icfs:name</ref>
<displayName>Groupname</displayName>
Expand Down
2 changes: 1 addition & 1 deletion model/model-intest/src/test/resources/logback-test.xml
Expand Up @@ -59,7 +59,7 @@
<logger name="com.evolveum.midpoint.model.impl.util" level="DEBUG" />
<logger name="com.evolveum.midpoint.model.impl.sync" level="DEBUG" />
<logger name="com.evolveum.midpoint.model.impl.sync.CorrelationConfirmationEvaluator" level="DEBUG" />
<logger name="com.evolveum.midpoint.provisioning" level="DEBUG" />
<logger name="com.evolveum.midpoint.provisioning" level="TRACE" />
<logger name="com.evolveum.midpoint.provisioning.impl.ResourceManager" level="DEBUG" />
<logger name="com.evolveum.midpoint.expression" level="DEBUG" />
<logger name="com.evolveum.midpoint.model.common.expression" level="DEBUG" />
Expand Down
Expand Up @@ -3233,6 +3233,12 @@ public void test222EntitleAccountWillPillage() throws Exception {

syncServiceMock.assertNotifySuccessOnly();
assertDummyResourceGroupMembersReadCountIncrement(null, 0);

PrismObject<ShadowType> shadow = provisioningService.getObject(ShadowType.class, ACCOUNT_WILL_OID, null, task, result);
display("Shadow after", shadow);
assertEntitlementGroup(shadow, GROUP_PIRATES_OID);
assertEntitlementPriv(shadow, PRIVILEGE_PILLAGE_OID);

assertSteadyResource();
}

Expand Down Expand Up @@ -3280,7 +3286,7 @@ public void test222bEntitleAccountWillBargain() throws Exception {
assertMember(group, transformNameFromResource(getWillRepoIcfName()));

syncServiceMock.assertNotifySuccessOnly();

assertSteadyResource();
}

Expand Down Expand Up @@ -3462,6 +3468,12 @@ public void test228DetitleAccountWillPirates() throws Exception {

assertDummyResourceGroupMembersReadCountIncrement(null, 0);
syncServiceMock.assertNotifySuccessOnly();

PrismObject<ShadowType> shadow = provisioningService.getObject(ShadowType.class, ACCOUNT_WILL_OID, null, task, result);
display("Shadow after", shadow);
assertEntitlementPriv(shadow, PRIVILEGE_PILLAGE_OID);
assertEntitlementPriv(shadow, PRIVILEGE_BARGAIN_OID);

assertSteadyResource();
}

Expand Down Expand Up @@ -3506,6 +3518,12 @@ public void test229DetitleAccountWillPillage() throws Exception {
assertNotNull("Privilege object is gone!", priv);

syncServiceMock.assertNotifySuccessOnly();

PrismObject<ShadowType> shadow = provisioningService.getObject(ShadowType.class, ACCOUNT_WILL_OID, null, task, result);
display("Shadow after", shadow);
assertEntitlementPriv(shadow, PRIVILEGE_BARGAIN_OID);


assertSteadyResource();
}

Expand Down
Expand Up @@ -30,6 +30,7 @@
import com.evolveum.icf.dummy.resource.DummyAccount;
import com.evolveum.icf.dummy.resource.DummyGroup;
import com.evolveum.icf.dummy.resource.DummyPrivilege;
import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.prism.delta.ObjectDelta;
import com.evolveum.midpoint.prism.match.MatchingRule;
import com.evolveum.midpoint.prism.match.MatchingRuleRegistry;
Expand Down Expand Up @@ -156,6 +157,10 @@ public void test280EntitleAccountWillPiratesAlreadyThere() throws Exception {

syncServiceMock.assertNotifySuccessOnly();

PrismObject<ShadowType> shadow = provisioningService.getObject(ShadowType.class, ACCOUNT_WILL_OID, null, task, result);
display("Shadow after", shadow);
assertEntitlementGroup(shadow, GROUP_PIRATES_OID);

assertSteadyResource();
}

Expand Down Expand Up @@ -234,6 +239,10 @@ public void test285EntitleAccountWillPiratesAlreadyThereCaseIgnore() throws Exce

syncServiceMock.assertNotifySuccessOnly();

PrismObject<ShadowType> shadow = provisioningService.getObject(ShadowType.class, ACCOUNT_WILL_OID, null, task, result);
display("Shadow after", shadow);
assertEntitlementGroup(shadow, GROUP_PIRATES_OID);

assertSteadyResource();
}

Expand Down

0 comments on commit 772d97d

Please sign in to comment.