use of com.google.gerrit.testing.InMemoryRepositoryManager in project gerrit by GerritCodeReview.
the class RepoSequenceTest method setUp.
@Before
public void setUp() throws Exception {
repoManager = new InMemoryRepositoryManager();
project = Project.nameKey("project");
repoManager.createRepository(project);
}
use of com.google.gerrit.testing.InMemoryRepositoryManager in project gerrit by GerritCodeReview.
the class ProjectResetterTest method setUp.
@Before
public void setUp() throws Exception {
repoManager = new InMemoryRepositoryManager();
project = Project.nameKey("foo");
repo = repoManager.createRepository(project);
}
use of com.google.gerrit.testing.InMemoryRepositoryManager in project gerrit by GerritCodeReview.
the class GerritServer method restart.
public static GerritServer restart(GerritServer server, @Nullable Module testSysModule, @Nullable Module testSshModule) throws Exception {
checkState(server.desc.sandboxed(), "restarting as slave requires @Sandboxed");
Config cfg = server.testInjector.getInstance(Key.get(Config.class, GerritServerConfig.class));
Path site = server.testInjector.getInstance(Key.get(Path.class, SitePath.class));
InMemoryRepositoryManager inMemoryRepoManager = null;
if (hasBinding(server.testInjector, InMemoryRepositoryManager.class)) {
inMemoryRepoManager = server.testInjector.getInstance(InMemoryRepositoryManager.class);
}
server.close();
server.daemon.stop();
return start(server.desc, cfg, site, testSysModule, null, testSshModule, inMemoryRepoManager);
}
use of com.google.gerrit.testing.InMemoryRepositoryManager in project gerrit by GerritCodeReview.
the class NoteDbSchemaVersionCheckTest method setup.
@Before
public void setup() throws Exception {
AllProjectsName allProjectsName = new AllProjectsName("All-Projects");
GitRepositoryManager repoManager = new InMemoryRepositoryManager();
repoManager.createRepository(allProjectsName);
versionManager = new NoteDbSchemaVersionManager(allProjectsName, repoManager);
versionManager.init();
sitePaths = new SitePaths(Paths.get("/tmp/foo"));
}
use of com.google.gerrit.testing.InMemoryRepositoryManager in project gerrit by GerritCodeReview.
the class RepoViewTest method setUp.
@Before
public void setUp() throws Exception {
InMemoryRepositoryManager repoManager = new InMemoryRepositoryManager();
Project.NameKey project = Project.nameKey("project");
repo = repoManager.createRepository(project);
tr = new TestRepository<>(repo);
tr.branch(MASTER).commit().create();
view = new RepoView(repoManager, project);
}
Aggregations