提交 0adf979c 编写于 作者: J Jesse Glick

[FIXED JENKINS-10450] Use 404 status code for noWorkspace.jelly.

上级 434aecef
......@@ -55,6 +55,9 @@ Upcoming changes</a>
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=rfe>
Missing workspace page should use 404 status code.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-10450">issue 10450</a>)
<li class=bug>
Updated SSH Slaves plugin to 1.8.
</ul>
......
......@@ -25,6 +25,7 @@ THE SOFTWARE.
<!-- tell user that there's no workspace yet -->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<st:statusCode value="404"/>
<l:layout>
<st:include page="sidepanel.jelly" />
<l:main-panel>
......
......@@ -88,6 +88,7 @@ import java.util.logging.Logger;
import org.junit.Ignore;
import org.jvnet.hudson.test.Bug;
import org.jvnet.hudson.test.Issue;
/**
*
......@@ -202,6 +203,18 @@ public class ProjectTest {
p.getLastBuild().delete();
assertNull("Project should not have build with some workspace.", p.getSomeBuildWithWorkspace());
}
@Issue("JENKINS-10450")
@Test public void workspaceBrowsing() throws Exception {
FreeStyleProject p = j.createFreeStyleProject("project");
p.getBuildersList().add(new Shell("echo ahoj > some.log"));
j.buildAndAssertSuccess(p);
JenkinsRule.WebClient wc = j.createWebClient();
wc.goTo("job/project/ws/some.log", "text/plain");
wc.assertFails("job/project/ws/other.log", 404);
p.doDoWipeOutWorkspace();
wc.assertFails("job/project/ws/some.log", 404);
}
@Test
public void testGetQuietPeriod() throws IOException{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册