| Summary: | add support for Gerrit 2.7 comment links | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Steffen Pingel <steffen.pingel> |
| Component: | Mylyn | Assignee: | Project Inbox <mylyn-triaged> |
| Status: | CLOSED MOVED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | tomasz.zarna |
| Version: | unspecified | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
| Bug Depends on: | 412872 | ||
| Bug Blocks: | |||
For posterity, here's the test:
bc.. @Test
public void testRefreshConfigCommentLinks() throws Exception {
if (!GerritFixture.current().canAuthenticate()
|| !GerritFixture.current().getCapabilities().supportsCommentLinks()) {
return; // skip
}
List<CommentLink> expected = new ArrayList<CommentLink>();
expected.add(new CommentLink("(I[0-9a-f]{8,40})", "<a href=\"#q,$1,n,z\">$&</a>"));
expected.add(new CommentLink("(bug\\s+)(\\d+)", "<a href=\"http://bugs.mylyn.org/show_bug.cgi?id=$2\">$&</a>"));
expected.add(new CommentLink("([Tt]ask:\\s+)(\\d+)", "$1<a href=\"http://tracker.mylyn.org/$2\">$2</a>"));
client = harness.client();
GerritConfiguration config = client.refreshConfig(new NullProgressMonitor());
List<CommentLink> links = config.getGerritConfig().getCommentLinks2();
assertEquals(expected, links);
}
Mylyn has been restructured, and our issue tracking has moved to GitHub [1]. We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub. [1] https://github.com/orgs/eclipse-mylyn |
All tests pass against Gerrit 2.7 except for one: junit.framework.AssertionFailedError: expected:<[CommentLink [find=(I[0-9a-f]{8,40}), replace=<a href="#q,$1,n,z">$&</a>], CommentLink [find=(bug\s+)(\d+), replace=<a href="http://bugs.mylyn.org/show_bug.cgi?id=$2">$&</a>], CommentLink [find=([Tt]ask:\s+)(\d+), replace=$1<a href="http://tracker.mylyn.org/$2">$2</a>]]> but was:<null> at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.failNotEquals(Assert.java:283) at junit.framework.Assert.assertEquals(Assert.java:64) at junit.framework.Assert.assertEquals(Assert.java:71) at org.eclipse.mylyn.gerrit.tests.core.client.GerritClientTest.testRefreshConfigCommentLinks(GerritClientTest.java:116) ... It looks like configuration for comment links has changed: http://gerrit-documentation.googlecode.com/svn/Documentation/2.7/config-gerrit.html#commentlink