Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ public static Boolean isPluginEnabled(IGerritHudsonTriggerConfig config, String

CloseableHttpResponse execute = null;
try {
execute = HttpUtils.performHTTPGet(config, restUrl + "plugins/" + pluginName + "/");
execute = HttpUtils.performHTTPGet(config,
restUrl + "plugins/" + pluginName + "/Documentation/index.html");
int statusCode = execute.getStatusLine().getStatusCode();
logger.debug("status code: {}", statusCode);
return decodeStatus(statusCode, pluginName, quiet);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ public void setUp() throws Exception {
server.returnCommandFor(GERRIT_STREAM_EVENTS, SshdServerMock.CommandMock.class);
server.returnCommandFor("gerrit review.*", SshdServerMock.EofCommandMock.class);
server.returnCommandFor("gerrit version", SshdServerMock.EofCommandMock.class);
stubFor(get(urlEqualTo("/plugins/" + GerritMissedEventsPlaybackManager.EVENTS_LOG_PLUGIN_NAME + "/"))
stubFor(get(urlEqualTo("/plugins/" + GerritMissedEventsPlaybackManager.EVENTS_LOG_PLUGIN_NAME +
"/Documentation/index.html"))
.willReturn(aResponse()
.withStatus(HTTPOK)
.withHeader("Content-Type", "text/html")
.withBody("ok")));

}

/**
Expand Down Expand Up @@ -202,7 +202,8 @@ public void testLosePluginSupportedWithEventsAndRestart() throws Exception {
EventTimeSlice lastTimeStamp = gerritServer.getMissedEventsPlaybackManager().getServerTimestamp();

// now we force the plugin is supported to false...
stubFor(get(urlEqualTo("/plugins/" + GerritMissedEventsPlaybackManager.EVENTS_LOG_PLUGIN_NAME + "/"))
stubFor(get(urlEqualTo("/plugins/" + GerritMissedEventsPlaybackManager.EVENTS_LOG_PLUGIN_NAME +
"/Documentation/index.html"))
.willReturn(aResponse()
.withStatus(HTTPERROR)
.withHeader("Content-Type", "text/html")
Expand All @@ -222,7 +223,8 @@ public void testLosePluginSupportedWithEventsAndRestart() throws Exception {
Thread.sleep(SLEEPTIME);

// now we re-enable feature:
stubFor(get(urlEqualTo("/plugins/" + GerritMissedEventsPlaybackManager.EVENTS_LOG_PLUGIN_NAME + "/"))
stubFor(get(urlEqualTo("/plugins/" + GerritMissedEventsPlaybackManager.EVENTS_LOG_PLUGIN_NAME +
"/Documentation/index.html"))
.willReturn(aResponse()
.withStatus(HTTPOK)
.withHeader("Content-Type", "text/html")
Expand Down