gerrit/plugins
David Ostrovsky 8df8af2572 Manually bind plugin guice modules in gerrit Guice universe
Short circuit the plugin loading phase from the unit tests by passing
the module names from the manifest file.

This allows us to avoid building and deploying the plugin JAR from
within build tool chain.

To use the simplified plugin bootstrap tests, plugin test class must
be inherited from the LightweightPluginDaemonTest class and must be
annotated with @TestPlugin annotation:

  @TestPlugin(
    name = "cookbook",
    sysModule = "com.googlesource.gerrit.plugins.cookbook.Module",
    httpModule = "com.googlesource.gerrit.plugins.cookbook.HttpModule",
    sshModule = "com.googlesource.gerrit.plugins.cookbook.SshModule"
  )
  public class CookbookIT extends LightweightPluginDaemonTest {
    @Test
    public void revisionTest() throws Exception {
      createChange();
      RestResponse response =
          adminRestSession.post("/changes/1/revisions/1/cookbook~hello-revision");
      assertThat(response.getEntityContent())
          .contains("Hello admin from change 1, patch set 1!");
    }
  }

Inspired-By: Dave Borowitz <dborowitz@google.com>
Change-Id: I689bb71413ecfbbf99f72730b0d2617bf526d9dd
2016-12-08 12:14:48 +00:00
..
commit-message-length-validator@1c9b04feb0 Update git submodules 2016-12-07 15:12:22 +00:00
cookbook-plugin@d3c74f3692 Manually bind plugin guice modules in gerrit Guice universe 2016-12-08 12:14:48 +00:00
download-commands@29b2516f2c Update git submodules 2016-12-07 15:12:22 +00:00
hooks@e5b687e9fc Update git submodules 2016-12-07 15:12:22 +00:00
replication@0ed3b13df0 Update git submodules 2016-12-07 15:12:22 +00:00
reviewnotes@a4586ed9cf Update git submodules 2016-12-07 15:12:22 +00:00
singleusergroup@7a9b8781cf Update git submodules 2016-12-07 15:12:22 +00:00
BUCK Move hooks from core Gerrit to 'hooks' plugin 2016-07-04 11:06:18 +09:00
BUILD Bazel: Reformat build files 2016-12-07 11:33:07 +00:00