Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
jenkins
提交
7788632a
J
jenkins
项目概览
LinuxSuRen
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
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,发现更多精彩内容 >>
提交
7788632a
编写于
4月 30, 2012
作者:
K
Kohsuke Kawaguchi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed test failures and regressions.
上级
3b5e9f9d
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
33 addition
and
20 deletion
+33
-20
core/src/main/java/hudson/matrix/MatrixProject.java
core/src/main/java/hudson/matrix/MatrixProject.java
+1
-1
core/src/main/java/hudson/model/Project.java
core/src/main/java/hudson/model/Project.java
+1
-1
maven-plugin/src/main/java/hudson/maven/MavenModuleSet.java
maven-plugin/src/main/java/hudson/maven/MavenModuleSet.java
+1
-1
test/src/test/java/hudson/bugs/seasar/Operation2174Test.java
test/src/test/java/hudson/bugs/seasar/Operation2174Test.java
+5
-9
test/src/test/java/hudson/model/HelpLinkTest.java
test/src/test/java/hudson/model/HelpLinkTest.java
+13
-4
test/src/test/java/hudson/tasks/MailerTest.java
test/src/test/java/hudson/tasks/MailerTest.java
+5
-3
test/src/test/java/hudson/util/FormFieldValidatorTest.java
test/src/test/java/hudson/util/FormFieldValidatorTest.java
+7
-1
未找到文件。
core/src/main/java/hudson/matrix/MatrixProject.java
浏览文件 @
7788632a
...
...
@@ -719,7 +719,7 @@ public class MatrixProject extends AbstractProject<MatrixProject,MatrixBuild> im
buildWrappers
.
rebuild
(
req
,
json
,
BuildWrappers
.
getFor
(
this
));
builders
.
rebuildHetero
(
req
,
json
,
Builder
.
all
(),
"builder"
);
publishers
.
rebuild
(
req
,
json
,
BuildStepDescriptor
.
filter
(
Publisher
.
all
(),
this
.
getClass
())
);
publishers
.
rebuild
Hetero
(
req
,
json
,
Publisher
.
all
(),
"publisher"
);
rebuildConfigurations
();
}
...
...
core/src/main/java/hudson/model/Project.java
浏览文件 @
7788632a
...
...
@@ -200,7 +200,7 @@ public abstract class Project<P extends Project<P,B>,B extends Build<P,B>>
buildWrappers
.
rebuild
(
req
,
json
,
BuildWrappers
.
getFor
(
this
));
builders
.
rebuildHetero
(
req
,
json
,
Builder
.
all
(),
"builder"
);
publishers
.
rebuild
(
req
,
json
,
BuildStepDescriptor
.
filter
(
Publisher
.
all
(),
this
.
getClass
())
);
publishers
.
rebuild
Hetero
(
req
,
json
,
Publisher
.
all
(),
"publisher"
);
}
@Override
...
...
maven-plugin/src/main/java/hudson/maven/MavenModuleSet.java
浏览文件 @
7788632a
...
...
@@ -1042,7 +1042,7 @@ public class MavenModuleSet extends AbstractMavenProject<MavenModuleSet,MavenMod
processPlugins
=
req
.
hasParameter
(
"maven.processPlugins"
);
mavenValidationLevel
=
NumberUtils
.
toInt
(
req
.
getParameter
(
"maven.validationLevel"
),
-
1
);
reporters
.
rebuild
(
req
,
json
,
MavenReporters
.
getConfigurableList
());
publishers
.
rebuild
(
req
,
json
,
BuildStepDescriptor
.
filter
(
Publisher
.
all
(),
this
.
getClass
())
);
publishers
.
rebuild
Hetero
(
req
,
json
,
Publisher
.
all
(),
"publisher"
);
buildWrappers
.
rebuild
(
req
,
json
,
BuildWrappers
.
getFor
(
this
));
settingConfigId
=
req
.
getParameter
(
"maven.mavenSettingsConfigId"
);
globalSettingConfigId
=
req
.
getParameter
(
"maven.mavenGlobalSettingConfigId"
);
...
...
test/src/test/java/hudson/bugs/seasar/Operation2174Test.java
浏览文件 @
7788632a
...
...
@@ -53,23 +53,19 @@ public class Operation2174Test extends HudsonTestCase {
HtmlForm
form
=
page
.
getFormByName
(
"config"
);
// configure downstream build
DescriptorImpl
btd
=
hudson
.
getDescriptorByType
(
DescriptorImpl
.
class
);
form
.
getInputByName
(
btd
.
getJsonSafeClassName
()).
click
();
form
.
getInputByName
(
"buildTrigger.childProjects"
).
setValueAttribute
(
"dp"
);
submit
(
form
);
up
.
getPublishersList
().
add
(
new
BuildTrigger
(
"dp"
,
false
));
configRoundtrip
(
up
);
// verify that the relationship is set up
BuildTrigger
trigger
=
up
.
getPublishersList
().
get
(
BuildTrigger
.
class
);
assertEquals
(
trigger
.
getChildProjects
(),
Collections
.
singletonList
(
dp
));
assertEquals
(
trigger
.
getChildProjects
(
up
),
Collections
.
singletonList
(
dp
));
// now go ahead and edit the downstream
page
=
webClient
.
getPage
(
dp
,
"configure"
);
form
=
page
.
getFormByName
(
"config"
);
submit
(
form
);
configRoundtrip
(
dp
);
// verify that the relationship is set up
trigger
=
up
.
getPublishersList
().
get
(
BuildTrigger
.
class
);
assertNotNull
(
trigger
);
assertEquals
(
trigger
.
getChildProjects
(),
Collections
.
singletonList
(
dp
));
assertEquals
(
trigger
.
getChildProjects
(
up
),
Collections
.
singletonList
(
dp
));
}
}
test/src/test/java/hudson/model/HelpLinkTest.java
浏览文件 @
7788632a
package
hudson.model
;
import
hudson.Functions
;
import
hudson.tasks.BuildStepMonitor
;
import
org.jvnet.hudson.test.HudsonTestCase
;
import
com.gargoylesoftware.htmlunit.html.HtmlPage
;
import
com.gargoylesoftware.htmlunit.html.HtmlAnchor
;
...
...
@@ -33,8 +35,9 @@ public class HelpLinkTest extends HudsonTestCase {
clickAllHelpLinks
(
createMatrixProject
());
}
private
void
clickAllHelpLinks
(
Job
j
)
throws
Exception
{
clickAllHelpLinks
(
new
WebClient
().
getPage
(
j
,
"configure"
));
private
void
clickAllHelpLinks
(
AbstractProject
j
)
throws
Exception
{
// TODO: how do we add all the builders and publishers so that we can test this meaningfully?
clickAllHelpLinks
(
new
WebClient
().
getPage
(
j
,
"configure"
));
}
private
void
clickAllHelpLinks
(
HtmlPage
p
)
throws
Exception
{
...
...
@@ -46,7 +49,7 @@ public class HelpLinkTest extends HudsonTestCase {
helpLink
.
click
();
}
public
static
class
HelpNotFoundBuilder
extends
Build
er
{
public
static
class
HelpNotFoundBuilder
extends
Publish
er
{
public
static
final
class
DescriptorImpl
extends
BuildStepDescriptor
{
public
boolean
isApplicable
(
Class
jobType
)
{
return
true
;
...
...
@@ -61,6 +64,10 @@ public class HelpLinkTest extends HudsonTestCase {
return
"I don't have the help file"
;
}
}
public
BuildStepMonitor
getRequiredMonitorService
()
{
return
BuildStepMonitor
.
BUILD
;
}
}
/**
...
...
@@ -71,7 +78,9 @@ public class HelpLinkTest extends HudsonTestCase {
DescriptorImpl
d
=
new
DescriptorImpl
();
Publisher
.
all
().
add
(
d
);
try
{
clickAllHelpLinks
(
createFreeStyleProject
());
FreeStyleProject
p
=
createFreeStyleProject
();
p
.
getPublishersList
().
add
(
new
HelpNotFoundBuilder
());
clickAllHelpLinks
(
p
);
fail
(
"should detect a failure"
);
}
catch
(
AssertionError
e
)
{
if
(
e
.
getMessage
().
contains
(
d
.
getHelpFile
()))
...
...
test/src/test/java/hudson/tasks/MailerTest.java
浏览文件 @
7788632a
...
...
@@ -90,11 +90,13 @@ public class MailerTest extends HudsonTestCase {
verifyRoundtrip
(
m
);
}
private
void
verifyRoundtrip
(
Mailer
m
)
throws
Exception
{
private
void
verifyRoundtrip
(
Mailer
before
)
throws
Exception
{
FreeStyleProject
p
=
createFreeStyleProject
();
p
.
getPublishersList
().
add
(
m
);
p
.
getPublishersList
().
add
(
before
);
submit
(
new
WebClient
().
getPage
(
p
,
"configure"
).
getFormByName
(
"config"
));
assertEqualBeans
(
m
,
p
.
getPublishersList
().
get
(
Mailer
.
class
),
"recipients,dontNotifyEveryUnstableBuild,sendToIndividuals"
);
Mailer
after
=
p
.
getPublishersList
().
get
(
Mailer
.
class
);
assertNotSame
(
before
,
after
);
assertEqualBeans
(
before
,
after
,
"recipients,dontNotifyEveryUnstableBuild,sendToIndividuals"
);
}
public
void
testGlobalConfigRoundtrip
()
throws
Exception
{
...
...
test/src/test/java/hudson/util/FormFieldValidatorTest.java
浏览文件 @
7788632a
...
...
@@ -24,6 +24,7 @@
package
hudson.util
;
import
hudson.model.FreeStyleProject
;
import
hudson.tasks.BuildStepMonitor
;
import
hudson.tasks.Builder
;
import
hudson.tasks.BuildStepDescriptor
;
import
hudson.tasks.Publisher
;
...
...
@@ -43,7 +44,7 @@ public class FormFieldValidatorTest extends HudsonTestCase {
new
WebClient
().
getPage
(
p
,
"configure"
);
}
public
static
class
BrokenFormValidatorBuilder
extends
Build
er
{
public
static
class
BrokenFormValidatorBuilder
extends
Publish
er
{
public
static
final
class
DescriptorImpl
extends
BuildStepDescriptor
{
public
boolean
isApplicable
(
Class
jobType
)
{
return
true
;
...
...
@@ -57,6 +58,10 @@ public class FormFieldValidatorTest extends HudsonTestCase {
return
"I have broken form field validation"
;
}
}
public
BuildStepMonitor
getRequiredMonitorService
()
{
return
BuildStepMonitor
.
BUILD
;
}
}
/**
...
...
@@ -68,6 +73,7 @@ public class FormFieldValidatorTest extends HudsonTestCase {
Publisher
.
all
().
add
(
d
);
try
{
FreeStyleProject
p
=
createFreeStyleProject
();
p
.
getPublishersList
().
add
(
new
BrokenFormValidatorBuilder
());
new
WebClient
().
getPage
(
p
,
"configure"
);
fail
(
"should have failed"
);
}
catch
(
AssertionError
e
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录