summaryrefslogtreecommitdiffstats
path: root/auth/auth-service/src/test/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'auth/auth-service/src/test/java/org')
-rw-r--r--auth/auth-service/src/test/java/org/onap/aaf/auth/service/validation/test/JU_ServiceValidator.java12
1 files changed, 12 insertions, 0 deletions
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() {