Package hudson.cli
Class CLICommandInvoker
- java.lang.Object
-
- hudson.cli.CLICommandInvoker
-
public class CLICommandInvoker extends Object
Helper class to invokeCLICommandand check the response.- Author:
- ogondza
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCLICommandInvoker.Matcherstatic classCLICommandInvoker.Result
-
Constructor Summary
Constructors Constructor Description CLICommandInvoker(JenkinsRule rule, hudson.cli.CLICommand command)CLICommandInvoker(JenkinsRule rule, String command)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CLICommandInvokerasUser(String user)Run the command as a given username.CLICommandInvokerauthorizedTo(hudson.security.Permission... permissions)Deprecated.Rather useasUser(java.lang.String).CLICommandInvoker.Resultinvoke()CLICommandInvoker.ResultinvokeWithArgs(String... args)hudson.model.Useruser()Deprecated.only used withauthorizedTo(hudson.security.Permission...)CLICommandInvokerwithArgs(String... args)CLICommandInvokerwithStdin(InputStream stdin)
-
-
-
Constructor Detail
-
CLICommandInvoker
public CLICommandInvoker(JenkinsRule rule, hudson.cli.CLICommand command)
-
CLICommandInvoker
public CLICommandInvoker(JenkinsRule rule, String command)
-
-
Method Detail
-
authorizedTo
@Deprecated public CLICommandInvoker authorizedTo(hudson.security.Permission... permissions)
Deprecated.Rather useasUser(java.lang.String).
-
asUser
public CLICommandInvoker asUser(String user)
Run the command as a given username. Test setup should have first defined a meaningful security realm and authorization strategy.- See Also:
Jenkins.setSecurityRealm(hudson.security.SecurityRealm),JenkinsRule.createDummySecurityRealm(),Jenkins.setAuthorizationStrategy(hudson.security.AuthorizationStrategy),MockAuthorizationStrategy
-
withStdin
public CLICommandInvoker withStdin(InputStream stdin)
-
withArgs
public CLICommandInvoker withArgs(String... args)
-
invokeWithArgs
public CLICommandInvoker.Result invokeWithArgs(String... args)
-
invoke
public CLICommandInvoker.Result invoke()
-
user
@Deprecated public hudson.model.User user()
Deprecated.only used withauthorizedTo(hudson.security.Permission...)
-
-