diff options
Diffstat (limited to 'applications/guard/src/test')
2 files changed, 10 insertions, 1 deletions
diff --git a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java index ac45cf39..f5392cfa 100644 --- a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java +++ b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java @@ -341,6 +341,15 @@ public class GuardPdpApplicationTest { // vfcount=0 below min of 1: should get a Deny because target IS blacklisted // requestAndCheckDecision(requestVfCount, DENY); + // + // vfcount=1 between min of 1 and max of 2: change the + // + ((Map<String, Object>) requestVfCount.getResource().get("guard")).put("target", + "another-vfmodule-where-root-is-true"); + // + // vfcount=0 below min of 1: should get a Deny because target IS blacklisted + // + requestAndCheckDecision(requestVfCount, DENY); } @SuppressWarnings("unchecked") diff --git a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslatorTest.java b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslatorTest.java index a48e3c93..d5dd16bf 100644 --- a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslatorTest.java +++ b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslatorTest.java @@ -301,7 +301,7 @@ public class GuardTranslatorTest { continue; } assertThat(((RuleType) rule).getTarget()).isNotNull(); - assertThat(((RuleType) rule).getTarget().getAnyOf()).hasSize(2); + assertThat(((RuleType) rule).getTarget().getAnyOf()).hasSize(1); for (AnyOfType anyOf : ((RuleType)rule).getTarget().getAnyOf()) { assertThat(anyOf.getAllOf()).isNotEmpty(); for (AllOfType allOf : anyOf.getAllOf()) { |