use of org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription in project gitiles by GerritCodeReview.
the class PaginatorTest method setUp.
@Before
public void setUp() throws Exception {
repo = new TestRepository<>(new InMemoryRepository(new DfsRepositoryDescription("test")));
walk = new RevWalk(repo.getRepository());
}
use of org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription in project gitiles by GerritCodeReview.
the class RevisionParserTest method setUp.
@Before
public void setUp() throws Exception {
repo = new TestRepository<>(new InMemoryRepository(new DfsRepositoryDescription("test")));
parser = new RevisionParser(repo.getRepository(), new TestGitilesAccess(repo.getRepository()).forRequest(null), new VisibilityCache(false, CacheBuilder.newBuilder().maximumSize(0)));
}
use of org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription in project gitiles by GerritCodeReview.
the class GitwebRedirectFilterTest method setUp.
@Before
public void setUp() throws Exception {
repo = new TestRepository<>(new InMemoryRepository(new DfsRepositoryDescription("test")));
servlet = TestGitilesServlet.create(repo);
}
use of org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription in project gerrit by GerritCodeReview.
the class GerritPublicKeyCheckerTest method setUpInjector.
@Before
public void setUpInjector() throws Exception {
Config cfg = InMemoryModule.newDefaultConfig();
cfg.setInt("receive", null, "maxTrustDepth", 2);
cfg.setStringList("receive", null, "trustedKey", ImmutableList.of(Fingerprint.toString(keyB().getPublicKey().getFingerprint()), Fingerprint.toString(keyD().getPublicKey().getFingerprint())));
Injector injector = Guice.createInjector(new InMemoryModule(cfg, new TestNotesMigration()));
lifecycle = new LifecycleManager();
lifecycle.add(injector);
injector.injectMembers(this);
lifecycle.start();
db = schemaFactory.open();
schemaCreator.create(db);
userId = accountManager.authenticate(AuthRequest.forUser("user")).getAccountId();
Account userAccount = db.accounts().get(userId);
// Note: does not match any key in TestKeys.
userAccount.setPreferredEmail("user@example.com");
db.accounts().update(ImmutableList.of(userAccount));
user = reloadUser();
requestContext.setContext(new RequestContext() {
@Override
public CurrentUser getUser() {
return user;
}
@Override
public Provider<ReviewDb> getReviewDbProvider() {
return Providers.of(db);
}
});
storeRepo = new InMemoryRepository(new DfsRepositoryDescription("repo"));
store = new PublicKeyStore(storeRepo);
}
use of org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription in project gerrit by GerritCodeReview.
the class PublicKeyStoreTest method setUp.
@Before
public void setUp() throws Exception {
tr = new TestRepository<>(new InMemoryRepository(new DfsRepositoryDescription("pubkeys")));
store = new PublicKeyStore(tr.getRepository());
}
Aggregations