Package com.google.gerrit.server.config

Examples of com.google.gerrit.server.config.SitePaths


    root.addAppender(dst);
  }

  public static LifecycleListener start(final File sitePath)
      throws FileNotFoundException {
    final File logdir = new SitePaths(sitePath).logs_dir;
    if (!logdir.exists() && !logdir.mkdirs()) {
      throw new Die("Cannot create log directory: " + logdir);
    }

    final PatternLayout layout = new PatternLayout();
View Full Code Here


  public void testUpdate() throws OrmException, FileNotFoundException,
      IOException {
    db.create();

    final File site = new File(UUID.randomUUID().toString());
    final SitePaths paths = new SitePaths(site);
    SchemaUpdater u = Guice.createInjector(new FactoryModule() {
      @Override
      protected void configure() {
        bind(new TypeLiteral<SchemaFactory<ReviewDb>>() {}).toInstance(db);
        bind(SitePaths.class).toInstance(paths);
View Full Code Here

import java.io.File;
import java.io.FileNotFoundException;

public class LibrariesTest extends TestCase {
  public void testCreate() throws FileNotFoundException {
    final SitePaths site = new SitePaths(new File("."));
    final ReloadSiteLibrary reload = createStrictMock(ReloadSiteLibrary.class);
    final ConsoleUI ui = createStrictMock(ConsoleUI.class);

    replay(ui);
    replay(reload);
View Full Code Here

public class UpgradeFrom2_0_xTest extends InitTestCase {

  @Test
  public void testUpgrade() throws IOException, ConfigInvalidException {
    final File p = newSitePath();
    final SitePaths site = new SitePaths(p);
    assertTrue(site.isNew);
    assertTrue(site.site_path.mkdir());
    assertTrue(site.etc_dir.mkdir());

    for (String n : UpgradeFrom2_0_x.etcFiles) {
View Full Code Here

TOP

Related Classes of com.google.gerrit.server.config.SitePaths

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.