minor optimization as suggested by todo
@@ -62,8 +62,8 @@ public class ReloadConfigurationCommandTest {
@Before public void setUp() {
j.jenkins.setSecurityRealm(j.createDummySecurityRealm());
ReloadConfigurationCommand cmd = new ReloadConfigurationCommand();
- cmd.setTransportAuth2(User.get("user").impersonate2()); // TODO https://github.com/jenkinsci/jenkins-test-harness/pull/53 use CLICommandInvoker.asUser
- command = new CLICommandInvoker(j, cmd);
+
+ command = new CLICommandInvoker(j, cmd).asUser("user");
j.jenkins.setAuthorizationStrategy(new MockAuthorizationStrategy()
.grant(Jenkins.READ).everywhere().toAuthenticated()
.grant(Jenkins.MANAGE).everywhere().toAuthenticated()
