From 75198a6b8e02e259109d5549252da42d3a3911c7 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Thu, 27 May 2021 18:07:35 -0400 Subject: [PATCH] Removing obsolete workaround for `withBasicApiToken` --- .../file_parameters/AbstractFileParameterDefinitionTest.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/test/java/io/jenkins/plugins/file_parameters/AbstractFileParameterDefinitionTest.java b/src/test/java/io/jenkins/plugins/file_parameters/AbstractFileParameterDefinitionTest.java index cd48523..82a30e2 100644 --- a/src/test/java/io/jenkins/plugins/file_parameters/AbstractFileParameterDefinitionTest.java +++ b/src/test/java/io/jenkins/plugins/file_parameters/AbstractFileParameterDefinitionTest.java @@ -31,7 +31,6 @@ import com.gargoylesoftware.htmlunit.util.NameValuePair; import hudson.cli.CLICommandInvoker; import hudson.model.ParametersDefinitionProperty; -import hudson.model.User; import java.io.ByteArrayInputStream; import java.io.File; import java.net.URL; @@ -88,7 +87,6 @@ public class AbstractFileParameterDefinitionTest { FileUtils.write(f, "uploaded content here", "UTF-8"); req.setEncodingType(FormEncodingType.MULTIPART); req.setRequestParameters(Collections.singletonList(new KeyDataPair("FILE", f, "myfile.txt", "text/plain", "UTF-8"))); - User.getById("admin", true); // TODO workaround for https://github.com/jenkinsci/jenkins-test-harness/pull/273 r.createWebClient().withBasicApiToken("admin").getPage(req); r.waitUntilNoActivity(); WorkflowRun b = p.getBuildByNumber(1); @@ -105,7 +103,6 @@ public class AbstractFileParameterDefinitionTest { p.setDefinition(new CpsFlowDefinition("echo(/received $env.FILE_FILENAME: $env.FILE/)", true)); // Like: curl -u $auth $jenkins/job/myjob/buildWithParameters WebRequest req = new WebRequest(new URL(r.getURL() + "job/myjob/buildWithParameters"), HttpMethod.POST); - User.getById("admin", true); // TODO workaround for https://github.com/jenkinsci/jenkins-test-harness/pull/273 r.createWebClient().withBasicApiToken("admin").getPage(req); r.waitUntilNoActivity(); WorkflowRun b = p.getBuildByNumber(1);