8286969: Add a new test library API to execute kinit in SecurityTools.java

Reviewed-by: rhalade, weijun
This commit is contained in:
Sibabrata Sahoo 2022-05-19 06:05:57 +00:00
parent 26c7c92bc9
commit dbda0e2bda

View File

@ -225,6 +225,18 @@ public class SecurityTools {
return execute(getProcessBuilder("klist", makeList(args)));
}
/**
* Runs kinit.
*
* @param args arguments to kinit in a single string. The string is
* converted to be List with makeList.
* @return an {@link OutputAnalyzer} object
* @throws Exception if there is an error
*/
public static OutputAnalyzer kinit(String args) throws Exception {
return execute(getProcessBuilder("kinit", makeList(args)));
}
/**
* Runs jar.
*