|
13 | 13 | import hudson.FilePath;
|
14 | 14 | import hudson.Functions;
|
15 | 15 | import hudson.Launcher;
|
16 |
| -import hudson.model.*; |
| 16 | +import hudson.model.AbstractBuild; |
| 17 | +import hudson.model.Action; |
| 18 | +import hudson.model.Cause; |
| 19 | +import hudson.model.Descriptor; |
| 20 | +import hudson.model.Descriptor.FormException; |
| 21 | +import hudson.model.EnvironmentContributingAction; |
| 22 | +import hudson.model.EnvironmentContributor; |
| 23 | +import hudson.model.Fingerprint; |
| 24 | +import hudson.model.FreeStyleBuild; |
| 25 | +import hudson.model.FreeStyleProject; |
| 26 | +import hudson.model.ParameterValue; |
| 27 | +import hudson.model.ParametersAction; |
| 28 | +import hudson.model.ParametersDefinitionProperty; |
| 29 | +import hudson.model.Result; |
| 30 | +import hudson.model.Run; |
| 31 | +import hudson.model.StringParameterDefinition; |
| 32 | +import hudson.model.StringParameterValue; |
| 33 | +import hudson.model.TaskListener; |
| 34 | +import hudson.model.User; |
17 | 35 | import hudson.plugins.git.GitSCM.DescriptorImpl;
|
18 | 36 | import hudson.plugins.git.browser.GithubWeb;
|
19 | 37 | import hudson.plugins.git.extensions.GitSCMExtension;
|
@@ -158,9 +176,9 @@ public void waitForJenkinsIdle() throws Exception {
|
158 | 176 | }
|
159 | 177 | }
|
160 | 178 |
|
161 |
| - private StandardCredentials getInvalidCredential() { |
| 179 | + private StandardCredentials getInvalidCredential() throws FormException { |
162 | 180 | String username = "bad-user";
|
163 |
| - String password = "bad-password"; |
| 181 | + String password = "bad-password-but-long-enough"; |
164 | 182 | CredentialsScope scope = CredentialsScope.GLOBAL;
|
165 | 183 | String id = "username-" + username + "-password-" + password;
|
166 | 184 | return new UsernamePasswordCredentialsImpl(scope, id, "desc: " + id, username, password);
|
@@ -2945,7 +2963,7 @@ private boolean isWindows() {
|
2945 | 2963 | return java.io.File.pathSeparatorChar==';';
|
2946 | 2964 | }
|
2947 | 2965 |
|
2948 |
| - private StandardCredentials createCredential(CredentialsScope scope, String id) { |
2949 |
| - return new UsernamePasswordCredentialsImpl(scope, id, "desc: " + id, "username", "password"); |
| 2966 | + private StandardCredentials createCredential(CredentialsScope scope, String id) throws FormException { |
| 2967 | + return new UsernamePasswordCredentialsImpl(scope, id, "desc: " + id, "username", "password-needs-to-be-14"); |
2950 | 2968 | }
|
2951 | 2969 | }
|
0 commit comments