提交 0d4f9a58 编写于 作者: J Jesse Glick

@oleg-nenashev created a BasicCredentialsProvider for SetupWizardTest but...

@oleg-nenashev created a BasicCredentialsProvider for SetupWizardTest but seems to have never used it.
上级 c69a0cd7
......@@ -82,7 +82,7 @@ THE SOFTWARE.
<artifactId>maven-plugin</artifactId>
<version>${maven-plugin.version}</version>
<exclusions>
<exclusion>
<exclusion> <!-- perhaps unnecessary as of JENKINS-35445? -->
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</exclusion>
......@@ -186,13 +186,6 @@ THE SOFTWARE.
<version>4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5</version>
<scope>test</scope>
<type>jar</type>
</dependency>
</dependencies>
<build>
......
......@@ -24,10 +24,8 @@
package jenkins.install;
import com.gargoylesoftware.htmlunit.Page;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import hudson.FilePath;
import hudson.model.UpdateSite;
import hudson.security.ACL;
import hudson.security.AuthorizationStrategy;
import hudson.security.SecurityRealm;
import java.io.ByteArrayOutputStream;
......@@ -35,12 +33,7 @@ import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import org.apache.commons.io.FileUtils;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.Credentials;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.impl.client.BasicCredentialsProvider;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.assertThat;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
......@@ -61,8 +54,6 @@ public class SetupWizardTest {
@Rule
public TemporaryFolder tmpdir = new TemporaryFolder();
BasicCredentialsProvider adminCredentialsProvider;
@Before
public void initSetupWizard() throws IOException, InterruptedException {
final SetupWizard wizard = j.jenkins.getSetupWizard();
......@@ -73,13 +64,6 @@ public class SetupWizardTest {
ByteArrayOutputStream ostream = new ByteArrayOutputStream();
adminPassFile.copyTo(ostream);
final String password = ostream.toString();
adminCredentialsProvider = new BasicCredentialsProvider() {
@Override
public Credentials getCredentials(AuthScope authscope) {
return new UsernamePasswordCredentials("admin", password);
}
};
}
@Test
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册