Skip to content

Commit

Permalink
withBasicApiToken should create the user as needed (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick authored Feb 24, 2021
1 parent 74c1765 commit ba6204a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/org/jvnet/hudson/test/JenkinsRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -2724,8 +2724,7 @@ public URL createCrumbedUrl(String relativePath) throws IOException {
* @since 2.32
*/
public @Nonnull WebClient withBasicApiToken(@Nonnull String userId){
User user = User.getById(userId, false);
assertNotNull("The userId must correspond to an already created User", user);
User user = User.getById(userId, true);
return withBasicApiToken(user);
}

Expand Down

0 comments on commit ba6204a

Please sign in to comment.