Package hudson.cli
Class CLICommandInvoker
java.lang.Object
hudson.cli.CLICommandInvoker
Helper class to invoke
CLICommand
and check the response.- Author:
- ogondza
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
ConstructorDescriptionCLICommandInvoker
(JenkinsRule rule, hudson.cli.CLICommand command) CLICommandInvoker
(JenkinsRule rule, String command) -
Method Summary
Modifier and TypeMethodDescriptionRun the command as a given username.authorizedTo
(hudson.security.Permission... permissions) Deprecated.invoke()
invokeWithArgs
(String... args) hudson.model.User
user()
Deprecated.only used withauthorizedTo(hudson.security.Permission...)
withStdin
(InputStream stdin)
-
Constructor Details
-
CLICommandInvoker
-
CLICommandInvoker
-
-
Method Details
-
authorizedTo
Deprecated.Rather useasUser(java.lang.String)
. -
asUser
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
-
withArgs
-
invokeWithArgs
-
invoke
-
user
Deprecated.only used withauthorizedTo(hudson.security.Permission...)
-
asUser(java.lang.String)
.