![]() 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 |
||
---|---|---|
.. | ||
commit-message-length-validator@1c9b04feb0 | ||
cookbook-plugin@d3c74f3692 | ||
download-commands@29b2516f2c | ||
hooks@e5b687e9fc | ||
replication@0ed3b13df0 | ||
reviewnotes@a4586ed9cf | ||
singleusergroup@7a9b8781cf | ||
BUCK | ||
BUILD |