From de038d3a92e1f13fac72ca53b52676fe223556a7 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Tue, 8 May 2018 14:33:18 -0500 Subject: Check Perm Instance ending in colon Issue-ID: AAF-269 Change-Id: I5422c0f119a53284ddc25eb7b99a8a6b09d3dd39 Signed-off-by: Instrumental Fix broken JUnits Issue-ID: AAF-270 Change-Id: I91e5d24b0e0610b10dcd12e90813e9ea00af1812 Signed-off-by: Instrumental --- .../auth/service/validation/test/JU_ServiceValidator.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'auth/auth-service/src/test/java/org') diff --git a/auth/auth-service/src/test/java/org/onap/aaf/auth/service/validation/test/JU_ServiceValidator.java b/auth/auth-service/src/test/java/org/onap/aaf/auth/service/validation/test/JU_ServiceValidator.java index a0e5bfa6..f304fccd 100644 --- a/auth/auth-service/src/test/java/org/onap/aaf/auth/service/validation/test/JU_ServiceValidator.java +++ b/auth/auth-service/src/test/java/org/onap/aaf/auth/service/validation/test/JU_ServiceValidator.java @@ -53,6 +53,18 @@ public class JU_ServiceValidator { assertTrue(validator.errs().equals("ERR_Security\n")); } + + @Test + public void permInstance() { + assertFalse(validator.permInstance("hello").err()); + assertFalse(validator.permInstance("hello32").err()); + assertFalse(validator.permInstance("hello-32").err()); + assertFalse(validator.permInstance(":asdf:*:sdf*:sdk").err()); + assertFalse(validator.permInstance(":asdf:*:sdf*:sdk*").err()); + // Perms may not end in ":" + assertTrue(validator.permInstance(":").err()); + assertTrue(validator.permInstance(":hello:").err()); + } @Test public void permOkNull() { -- cgit 1.2.3-korg