From d131f7ed38fd65d7f04b7d71368ba03e9000665c Mon Sep 17 00:00:00 2001 From: Instrumental Date: Wed, 27 Nov 2019 15:57:10 -0600 Subject: Fixes from Regression Tests Issue-ID: AAF-1058 Change-Id: I7d3ace9cef69a163c2ec0c9a48583fdfa9ca20af Signed-off-by: Instrumental --- .../src/main/java/org/onap/aaf/auth/cmd/user/Cred.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'auth/auth-cmd/src') diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java index 1a410088..9ef4c00a 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java @@ -132,11 +132,22 @@ public class Cred extends Cmd { // IMPORTANT! We do this backward, because it is looking for string // %1 or %13. If we replace %1 first, that messes up %13 + String var; for(int i=vars.size()-1;i>0;--i) { - text = text.replace("%"+(i+1), (i<10?" ":"") + i+") " + vars.get(i)); + var = vars.get(i); + if(aafcli.isTest()) { + int type = var.indexOf("U/P"); + if(type>0) { + var = var.substring(0,type+4) + " XXXX/XX/XX XX:XX UTC XXXXXXXXXXXXXXXXXX"; + } + } + text = text.replace("%"+(i+1), (i<10?" ":"") + i+") " + var); } text = text.replace("%1",vars.get(0)); + if(aafcli.isTest()) { + + } pw().println(text); } else if (fp.code()==406 && option==1) { pw().println("You cannot delete this Credential"); -- cgit 1.2.3-korg