Search in sources :

Example 1 with JettyServer

use of com.google.gerrit.pgm.http.jetty.JettyServer in project gerrit by GerritCodeReview.

the class AbstractGitOverHttpServlet method beforeEach.

@Before
public void beforeEach() throws Exception {
    jettyServer = server.getHttpdInjector().getInstance(JettyServer.class);
    CredentialsProvider.setDefault(new UsernamePasswordCredentialsProvider(admin.username(), admin.httpPassword()));
    selectProtocol(AbstractPushForReview.Protocol.HTTP);
// Don't clear audit events here, since we can't guarantee all test setup has run yet.
}
Also used : UsernamePasswordCredentialsProvider(org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider) JettyServer(com.google.gerrit.pgm.http.jetty.JettyServer) Before(org.junit.Before)

Aggregations

JettyServer (com.google.gerrit.pgm.http.jetty.JettyServer)1 UsernamePasswordCredentialsProvider (org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider)1 Before (org.junit.Before)1