提交 bee3b7c7 编写于 作者: B Basil Crow

[JENKINS-59231] Improve test coverage on the RSS feature

上级 e6aecfed
...@@ -82,6 +82,12 @@ public final class RSS { ...@@ -82,6 +82,12 @@ public final class RSS {
if(flavor==null) flavor="atom"; if(flavor==null) flavor="atom";
flavor = flavor.replace('/', '_'); // Don't allow path to any jelly flavor = flavor.replace('/', '_'); // Don't allow path to any jelly
if (flavor.equals("atom")) {
rsp.setContentType("application/atom+xml; charset=UTF-8");
} else {
rsp.setContentType("text/xml; charset=UTF-8");
}
req.getView(Jenkins.get(),"/hudson/"+flavor+".jelly").forward(req,rsp); req.getView(Jenkins.get(),"/hudson/"+flavor+".jelly").forward(req,rsp);
} }
} }
...@@ -42,10 +42,7 @@ public class RSSTest { ...@@ -42,10 +42,7 @@ public class RSSTest {
@Rule @Rule
public JenkinsRule j = new JenkinsRule(); public JenkinsRule j = new JenkinsRule();
//TODO remove the @Ignore
// Seems the XML parser on the CI machine is different / more picky than the one on my machine, will be covered by JENKINS-59231 to improve the code coverage
@Test @Test
@Ignore("XML parser too picky on CI")
@Issue("JENKINS-59167") @Issue("JENKINS-59167")
public void absoluteURLsPresentInRSS_evenWithoutRootUrlSetup() throws Exception { public void absoluteURLsPresentInRSS_evenWithoutRootUrlSetup() throws Exception {
XmlPage page = getRssPage(); XmlPage page = getRssPage();
...@@ -76,10 +73,7 @@ public class RSSTest { ...@@ -76,10 +73,7 @@ public class RSSTest {
} }
} }
//TODO remove the @Ignore
// Seems the XML parser on the CI machine is different / more picky than the one on my machine, will be covered by JENKINS-59231 to improve the code coverage
@Test @Test
@Ignore("XML parser too picky on CI")
@Issue("JENKINS-59167") @Issue("JENKINS-59167")
public void absoluteURLsPresentInAtom_evenWithoutRootUrlSetup() throws Exception { public void absoluteURLsPresentInAtom_evenWithoutRootUrlSetup() throws Exception {
XmlPage page = getAtomPage(); XmlPage page = getAtomPage();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册