gerrit/gerrit-acceptance-tests
David Ostrovsky feb5e7e98a Acceptance tests framework: Allow tests to change Gerrit configuration
Tests may want to contribute to the Gerrit configuration. Each method in
the test class should be able to add or override one or more parameters
of the Gerrit server configuration.

  public class UseGerritConfigAnnotationTest extends AbstractDaemonTest {

    @Inject
    @GerritServerConfig
    Config serverConfig;

    @Test
    @GerritConfig(name="x.y", value="z")
    public void testOne() {
      assertEquals("z", serverConfig.getString("x", null, "y"));
    }

    @Test
    @GerritConfigs({
        @GerritConfig(name="x.y", value="z"),
        @GerritConfig(name="a.b", value="c"),
    })
    public void testMultiple() {
      assertEquals("z", serverConfig.getString("x", null, "y"));
      assertEquals("c", serverConfig.getString("a", null, "b"));
    }
  }

Change-Id: I506d9f86280f1b067d2083cb33726009ed72c218
2013-09-18 10:50:20 +02:00
..
.settings Add .settings files for gerrit-acceptance-tests 2013-02-12 10:33:47 +00:00
src/test/java/com/google/gerrit/acceptance Acceptance tests framework: Allow tests to change Gerrit configuration 2013-09-18 10:50:20 +02:00
.gitignore Ignore bin folder in acceptance-tests 2013-02-22 08:41:31 +01:00
BUCK Rename DEFS files to *.defs 2013-07-30 17:18:33 +00:00
tests.defs Fix acceptance test heap size to 128m 2013-07-30 10:27:14 -07:00