Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
野花太放肆
jenkins
提交
fc836c13
J
jenkins
项目概览
野花太放肆
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fc836c13
编写于
7月 16, 2013
作者:
K
Kohsuke Kawaguchi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FIXED JENKINS-18771]
... with a test case. The fix is in Stapler.
上级
5a3d8771
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
114 addition
and
8 deletion
+114
-8
changelog.html
changelog.html
+3
-0
core/pom.xml
core/pom.xml
+1
-1
test/pom.xml
test/pom.xml
+22
-7
test/src/test/groovy/hudson/RelativePathTest.groovy
test/src/test/groovy/hudson/RelativePathTest.groovy
+65
-0
test/src/test/resources/hudson/RelativePathTest/Model/config.groovy
...est/resources/hudson/RelativePathTest/Model/config.groovy
+5
-0
test/src/test/resources/hudson/RelativePathTest/index.groovy
test/src/test/resources/hudson/RelativePathTest/index.groovy
+18
-0
未找到文件。
changelog.html
浏览文件 @
fc836c13
...
...
@@ -58,6 +58,9 @@ Upcoming changes</a>
<li
class=
bug
>
Provided maven settings.xml in maven builder is lost.
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-15976"
>
issue 15976
</a>
)
<li
class=
bug
>
Fixed a regression that broke some plugins' form validation
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-18776"
>
issue 18776
</a>
)
</ul>
</div>
<!--=TRUNK-END=-->
...
...
core/pom.xml
浏览文件 @
fc836c13
...
...
@@ -42,7 +42,7 @@ THE SOFTWARE.
<properties>
<staplerFork>
true
</staplerFork>
<stapler.version>
1.21
3
</stapler.version>
<stapler.version>
1.21
4
</stapler.version>
<spring.version>
2.5.6.SEC03
</spring.version>
</properties>
...
...
test/pom.xml
浏览文件 @
fc836c13
...
...
@@ -193,6 +193,28 @@ THE SOFTWARE.
<redirectTestOutputToFile>
true
</redirectTestOutputToFile>
</configuration>
</plugin>
<plugin>
<groupId>
org.codehaus.gmaven
</groupId>
<artifactId>
gmaven-plugin
</artifactId>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<id>
test-in-groovy
</id>
<!-- compile and process annotations in Groovy test code -->
<goals>
<goal>
generateTestStubs
</goal>
<goal>
testCompile
</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>
ant
</groupId>
<artifactId>
ant
</artifactId>
<version>
1.6.5
</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>
org.kohsuke.gmaven
</groupId>
<artifactId>
gmaven-plugin
</artifactId>
...
...
@@ -208,13 +230,6 @@ THE SOFTWARE.
<source>
${pom.basedir}/src/main/preset-data/package.groovy
</source>
</configuration>
</execution>
<execution>
<id>
test-in-groovy
</id>
<!-- allow tests written in Groovy -->
<goals>
<goal>
testCompile
</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
...
...
test/src/test/groovy/hudson/RelativePathTest.groovy
0 → 100644
浏览文件 @
fc836c13
package
hudson
import
hudson.model.AbstractDescribableImpl
import
hudson.model.Describable
import
hudson.model.Descriptor
import
hudson.util.ListBoxModel
import
org.jvnet.hudson.test.Bug
import
org.jvnet.hudson.test.HudsonTestCase
import
org.jvnet.hudson.test.TestExtension
import
org.kohsuke.stapler.QueryParameter
/**
* Regression test for JENKINS-18776
*
* @author Kohsuke Kawaguchi
*/
class
RelativePathTest
extends
HudsonTestCase
implements
Describable
<
RelativePathTest
>
{
@Bug
(
18776
)
void
testRelativePath
()
{
// I was having trouble causing annotation processing on test stubs
jenkins
.
getDescriptorOrDie
(
RelativePathTest
.
class
)
jenkins
.
getDescriptorOrDie
(
Model
.
class
)
createWebClient
().
goTo
(
"/self/"
);
assert
jenkins
.
getDescriptorOrDie
(
Model
.
class
).
touched
}
String
getName
()
{
return
"Alice"
;
}
Model
getModel
()
{
return
new
Model
();
}
DescriptorImpl
getDescriptor
()
{
return
jenkins
.
getDescriptorOrDie
(
getClass
());
}
@TestExtension
static
class
DescriptorImpl
extends
Descriptor
<
RelativePathTest
>
{
@Override
String
getDisplayName
()
{
return
""
;
}
}
static
class
Model
extends
AbstractDescribableImpl
<
Model
>
{
@TestExtension
static
class
DescriptorImpl
extends
Descriptor
<
Model
>
{
boolean
touched
;
@Override
String
getDisplayName
()
{
return
"test"
;
}
ListBoxModel
doFillAbcItems
(
@RelativePath
(
".."
)
@QueryParameter
String
name
)
{
assert
name
==
"Alice"
;
touched
=
true
;
return
new
ListBoxModel
().
add
(
"foo"
).
add
(
"bar"
)
}
}
}
}
test/src/test/resources/hudson/RelativePathTest/Model/config.groovy
0 → 100644
浏览文件 @
fc836c13
def
f
=
namespace
(
lib
.
FormTagLib
)
f
.
entry
(
field:
"abc"
)
{
f
.
select
()
}
\ No newline at end of file
test/src/test/resources/hudson/RelativePathTest/index.groovy
0 → 100644
浏览文件 @
fc836c13
package
hudson.RelativePathTest
def
l
=
namespace
(
lib
.
LayoutTagLib
)
def
j
=
namespace
(
"jelly:core"
)
def
f
=
namespace
(
lib
.
FormTagLib
)
l
.
layout
{
l
.
main_panel
{
set
(
"instance"
,
my
)
set
(
"descriptor"
,
my
.
descriptor
)
f
.
form
()
{
f
.
entry
(
field:
"name"
)
{
f
.
textbox
()
}
f
.
property
(
field:
"model"
)
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录