-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-44266, JENKINS-36654] Fix PCT for 2.46.2 #103
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e323a6d
[JENKINS-44266] Include tests dependency necessary when running again…
c9c11d8
[JENKINS-44266] Bump core and dependencies.
c76d279
[JENKINS-44266] Stop using HudsonTestCase.
e163ab3
[JENKINS-44266] Add @Test annotation.
5a810cf
[JENKINS-44266] Add back repositories tag in POM and replace @Bug for…
ec9c429
[JENKINS-44266] Use full ids for issues.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,19 +4,29 @@ | |
import hudson.model.FreeStyleProject; | ||
import hudson.plugins.promoted_builds.conditions.DownstreamPassCondition; | ||
import hudson.tasks.JavadocArchiver; | ||
import org.jvnet.hudson.test.Bug; | ||
import org.jvnet.hudson.test.HudsonTestCase; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.jvnet.hudson.test.Issue; | ||
import org.jvnet.hudson.test.JenkinsRule; | ||
|
||
import static com.gargoylesoftware.htmlunit.html.HtmlFormUtil.submit; | ||
import static org.junit.Assert.assertEquals; | ||
import static org.junit.Assert.assertTrue; | ||
|
||
/** | ||
* @author Seiji Sogabe | ||
*/ | ||
public class ConfigurationDoCheckTest extends HudsonTestCase { | ||
public class ConfigurationDoCheckTest { | ||
|
||
@Rule | ||
public JenkinsRule j = new JenkinsRule(); | ||
|
||
@Bug(7972) | ||
@Issue("7972") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use full id, e.g. "JENKINS-7972" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
@Test | ||
public void testCheckProcessNameRequired() throws Exception { | ||
FreeStyleProject down = createFreeStyleProject(); | ||
FreeStyleProject down = j.createFreeStyleProject(); | ||
|
||
FreeStyleProject p = createFreeStyleProject(); | ||
FreeStyleProject p = j.createFreeStyleProject(); | ||
JobPropertyImpl pp = new JobPropertyImpl(p); | ||
p.addProperty(pp); | ||
|
||
|
@@ -26,18 +36,20 @@ public void testCheckProcessNameRequired() throws Exception { | |
proc.getBuildSteps().add(new JavadocArchiver("somedir",true)); | ||
proc.icon = "star-blue"; | ||
|
||
WebClient client = new WebClient(); | ||
JenkinsRule.WebClient client = j.createWebClient(); | ||
client.getOptions().setThrowExceptionOnFailingStatusCode(false); | ||
HtmlPage page = submit(client.getPage(p, "configure").getFormByName("config")); | ||
|
||
HtmlPage page = (HtmlPage) submit(client.getPage(p, "configure").getFormByName("config")); | ||
assertTrue(page.asText().contains("No name is specified")); | ||
|
||
} | ||
|
||
@Bug(7972) | ||
@Issue("7972") | ||
@Test | ||
public void testCheckInvalidProcessName() throws Exception { | ||
FreeStyleProject down = createFreeStyleProject(); | ||
FreeStyleProject down = j.createFreeStyleProject(); | ||
|
||
FreeStyleProject p = createFreeStyleProject(); | ||
FreeStyleProject p = j.createFreeStyleProject(); | ||
JobPropertyImpl pp = new JobPropertyImpl(p); | ||
p.addProperty(pp); | ||
|
||
|
@@ -47,9 +59,10 @@ public void testCheckInvalidProcessName() throws Exception { | |
proc.getBuildSteps().add(new JavadocArchiver("somedir",true)); | ||
proc.icon = "star-blue"; | ||
|
||
WebClient client = new WebClient(); | ||
JenkinsRule.WebClient client = j.createWebClient(); | ||
client.getOptions().setThrowExceptionOnFailingStatusCode(false); | ||
HtmlPage page = submit(client.getPage(p, "configure").getFormByName("config")); | ||
|
||
HtmlPage page = (HtmlPage) submit(client.getPage(p, "configure").getFormByName("config")); | ||
assertTrue(page.asText().contains("unsafe character")); | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐛 In such case it won't be able to retrieve Parent pom if it is missing in the local cache.
OTOH you can simplify it to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, use
https
but otherwise yes that is the standard blurb.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copypasted from the wrong plugin :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, I thought this was already included in the parent POM.