summaryrefslogtreecommitdiffstats
path: root/auth/auth-service
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-05-08 14:33:18 -0500
committerInstrumental <jonathan.gathman@att.com>2018-05-09 06:05:32 -0500
commitde038d3a92e1f13fac72ca53b52676fe223556a7 (patch)
tree8676a1d3f1168dd5432297fb492016112ca2866c /auth/auth-service
parent34f6446e97199cb5aaefd1369d9faaf297a9b6bf (diff)
Check Perm Instance ending in colon
Issue-ID: AAF-269 Change-Id: I5422c0f119a53284ddc25eb7b99a8a6b09d3dd39 Signed-off-by: Instrumental <jonathan.gathman@att.com> Fix broken JUnits Issue-ID: AAF-270 Change-Id: I91e5d24b0e0610b10dcd12e90813e9ea00af1812 Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-service')
-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() {