Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
roginluo
Jenkins
提交
fc836c13
J
Jenkins
项目概览
roginluo
/
Jenkins
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
Jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
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>
...
@@ -58,6 +58,9 @@ Upcoming changes</a>
<li
class=
bug
>
<li
class=
bug
>
Provided maven settings.xml in maven builder is lost.
Provided maven settings.xml in maven builder is lost.
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-15976"
>
issue 15976
</a>
)
(
<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>
</ul>
</div>
<!--=TRUNK-END=-->
</div>
<!--=TRUNK-END=-->
...
...
core/pom.xml
浏览文件 @
fc836c13
...
@@ -42,7 +42,7 @@ THE SOFTWARE.
...
@@ -42,7 +42,7 @@ THE SOFTWARE.
<properties>
<properties>
<staplerFork>
true
</staplerFork>
<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>
<spring.version>
2.5.6.SEC03
</spring.version>
</properties>
</properties>
...
...
test/pom.xml
浏览文件 @
fc836c13
...
@@ -193,6 +193,28 @@ THE SOFTWARE.
...
@@ -193,6 +193,28 @@ THE SOFTWARE.
<redirectTestOutputToFile>
true
</redirectTestOutputToFile>
<redirectTestOutputToFile>
true
</redirectTestOutputToFile>
</configuration>
</configuration>
</plugin>
</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>
<plugin>
<groupId>
org.kohsuke.gmaven
</groupId>
<groupId>
org.kohsuke.gmaven
</groupId>
<artifactId>
gmaven-plugin
</artifactId>
<artifactId>
gmaven-plugin
</artifactId>
...
@@ -208,13 +230,6 @@ THE SOFTWARE.
...
@@ -208,13 +230,6 @@ THE SOFTWARE.
<source>
${pom.basedir}/src/main/preset-data/package.groovy
</source>
<source>
${pom.basedir}/src/main/preset-data/package.groovy
</source>
</configuration>
</configuration>
</execution>
</execution>
<execution>
<id>
test-in-groovy
</id>
<!-- allow tests written in Groovy -->
<goals>
<goal>
testCompile
</goal>
</goals>
</execution>
</executions>
</executions>
<dependencies>
<dependencies>
<dependency>
<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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录