Commit Graph
418 Commits
Author SHA1 Message Date
Jesse Glick bff177dfa1 Deprecating HudsonTestCase. 2013-06-12 16:23:11 -04:00
Jesse Glick 1ed4e4b80f Set a nonempty context path to strengthen tests, just like we do for hpi:run & hudson-dev:run. 2013-06-12 16:07:39 -04:00
Jesse Glick c4e3adde15 Better diagnosis when resolvePluginFile would be about to return null. 2013-06-10 17:07:48 -04:00
Jesse Glick b1c82f1e30 stephenc asks to use TODO rather than XXX 2013-06-10 11:53:13 -04:00
Jesse Glick aec064adc5 Make assertGC more useful by showing root references in case of failure. 2013-06-10 10:44:32 -04:00
Jesse Glick 04e2ccade6 [FIXED JENKINS-18074] Avoid clearing AbstractItem.displayName when the new parent ItemGroup is different. 2013-05-24 12:06:37 -04:00
Jesse Glick 03ca63c62c Lazy-loading utility test class designed for fix of JENKINS-15858. 2013-05-23 15:07:54 -04:00
Jesse Glick e3fee0aa36 Merge pull request #779 from ikedam/feature/JENKINS-17774-2
[FIXED JENKINS-17774] Plugin tests often fails in Windows (just reverting JENKINS-12647).
2013-05-22 11:39:32 -07:00
ikedam 68db55528a [FIXED JENKINS-17774] Make not to copy a webapp directory every time for each tests.
Copying every time causes overwriting files in the webapp directory, and often causes errors in Windows.
This reverts JENKINS-12647(commit 7ae303f881).
2013-05-15 20:58:48 +09:00
Jesse Glick a4bd40d3da Try harder to set Jenkins root URL, since some tests rely on it. 2013-05-10 12:38:03 -04:00
Jesse Glick 1205e9f6c4 [FIXED JENKINS-17575] Redirecting properly after deleting jobs in folders.
Expanded MockFolder to be a ViewGroup so that it is possible to test views inside folders,
and generally fixed it to service Stapler hierarchies properly so that WebClient-based tests can work.
2013-04-11 11:34:56 -04:00
Jesse Glick a4d4305124 Clean up TestPluginManager.INSTANCE.rootDir at the end of the test run.
Otherwise your disk will fill up with (large) /tmp/hudson*tmp/ dirs when running plugin tests.
(Would have been better to use e.g. TemporaryFolder, but that would require incompatible changes to the test harness.)
2013-03-28 19:44:20 -04:00
Jesse Glick a9e1de4f65 Behave properly when using Surefire excludedGroups (i.e. @Category).
To reproduce SUREFIRE-974 prior to this fix, pick an arbitrary group class to (not) exclude:
mvn -f test/pom.xml -Dtest=CoreJellyTest -DexcludedGroups=hudson.ExtensionPoint test
2013-03-28 14:01:23 -04:00
Jesse Glick 7c20f84737 createTmpDir → TemporaryFolder 2013-03-18 12:03:40 -04:00
Jesse Glick 2ef5a7cd43 Comment only. 2013-03-15 10:39:40 -04:00
Jesse Glick 5d68a20700 Using new assertFails method wherever possible to simplify tests. 2013-02-22 16:35:27 -05:00
Jesse Glick 0de3e9b14e [SECURITY-47]
- My second patch, with whitelisted XPath values and forbidden JSONP.
- Disabling JSONP altogether for REST API (unless explicitly allowed).
- Forbid primitive XPath result sets by default.
- Refuse to serve _crumb=123456 as this could (very hypothetically) be exploited.
(cherry picked from commit f4af9b1ab4)

Conflicts:

	core/src/main/java/hudson/model/Api.java
2013-02-13 15:31:22 -08:00
Jesse Glick 74e6409a06 [JENKINS-15156] Class loading errors can result from OOME if you are not careful. 2013-02-06 20:56:20 -05:00
Johno Crawford fe95fc53f8 [JENKINS-15156] Refactored fix. 2013-02-07 00:56:47 +01:00
Jesse Glick e11c01cde7 362362951c regressed handling of optional dependencies. 2013-01-30 15:13:12 -05:00
Jesse Glick 8035cda484 Correcting 696f8b8. 2013-01-30 15:11:45 -05:00
Jesse Glick cff4f406f4 @since associated with JenkinsRule. 2013-01-18 13:10:05 -05:00
Jesse Glick f178f0cef4 [JENKINS-16341] INSANE testing shows that a RenderOnDemandClosure binding adds about 380k, with or wothout 08efdf5. 2013-01-15 17:32:53 -05:00
Kohsuke Kawaguchi b4a17d3b45 merged back the RC branch
Conflicts:
	changelog.html
2013-01-07 11:31:49 -08:00
Kohsuke Kawaguchi 4895eaafca [SECURITY-49] added a tool to re-key secrets
As an AdministrativeMonitor, it shows up in the manage Jenkins UI, and
allows the administrator to run a re-keying operation.
2013-01-05 09:26:10 -08:00
Jesse Glick 9bd0210e07 Merge branch 'master' into User.authorities 2013-01-02 13:45:08 -05:00
Jesse Glick 46c170c9b1 Merge branch 'master' of github.com:jenkinsci/jenkins 2012-12-10 12:35:47 -05:00
Jesse Glick 327b93168f Comment. 2012-12-10 11:13:06 -05:00
Kohsuke Kawaguchi 148ed0d480 Merge branch 'pull-628' 2012-12-09 06:07:12 -08:00
Kohsuke Kawaguchi fe8319f971 alert should be considered a test failure unless overridden by the test case 2012-12-09 05:48:31 -08:00
Jesse Glick a8ba1162a3 Introduced MockFolder for testing. 2012-12-05 15:38:09 -05:00
Kohsuke Kawaguchi eeb99ed843 increased the timeout to 180 2012-11-18 10:20:44 -08:00
Jesse Glick 9f22e33ebd Verifying that the heap size of a SuiteResult (from Surefire) is linear in the sizes of TEST-*.xml + *-output.txt even when there is lots of stdio. 2012-10-18 15:54:29 -04:00
Jesse Glick 2e9ec45161 Updated a bit. 2012-10-18 14:25:12 -04:00
Jesse Glick d9ba4814f9 Removing stale references to dev.java.net. 2012-10-18 10:29:14 -04:00
Jesse Glick 918cf8dfca [FIXED JENKINS-15426] Run animal-sniffer:check by default (-DskipTests suppresses). 2012-10-17 13:09:02 -04:00
Jesse Glick b6ea88a05f Testing getAuthorities. 2012-10-16 10:22:13 -04:00
Jesse Glick 4557a436bf 5dd905f suffered from a ClassLoader issue visible only in maven-junit-plugin (not Surefire). 2012-09-05 19:18:43 -04:00
Jesse Glick 5dd905f2a2 Make @TestExtension work with JenkinsRule. 2012-09-05 18:15:16 -04:00
Jørgen P. Tjernø 7fead6ff7f DRY Failure/UnstableBuilder. 2012-09-01 09:26:21 -07:00
Kohsuke Kawaguchi c3f002cede merged back the RC branch 2012-08-29 10:03:33 -07:00
Kohsuke Kawaguchi 26276d1387 added a backward compatibility with MethodRule.
Without this, I saw:

FAILURE: initializationError(hudson.model.CauseTest)
[INFO] java.lang.Exception: Field j must implement MethodRule
[INFO] 	at org.junit.runners.BlockJUnit4ClassRunner.validateRuleField(BlockJUnit4ClassRunner.java:188)
[INFO] 	at org.junit.runners.BlockJUnit4ClassRunner.validateFields(BlockJUnit4ClassRunner.java:183)
[INFO] 	at org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunner.java:123)
[INFO] 	at org.junit.runners.ParentRunner.validate(ParentRunner.java:269)
[INFO] 	at org.junit.runners.ParentRunner.<init>(ParentRunner.java:66)
[INFO] 	at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:58)
[INFO] 	at org.junit.internal.builders.JUnit4Builder.runnerForClass(JUnit4Builder.java:13)
[INFO] 	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
[INFO] 	at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
[INFO] 	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
[INFO] 	at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
[INFO] 	at junit.framework.JUnit4TestAdapter.<init>(JUnit4TestAdapter.java:31)
[INFO] 	at junit.framework.JUnit4TestAdapter.<init>(JUnit4TestAdapter.java:24)
[INFO] 	at com.sun.maven.junit.LocalTestCaseRunner.buildMethodTestCase(LocalTestCaseRunner.java:121)
[INFO] 	at com.sun.maven.junit.LocalTestCaseRunner.buildTestCase(LocalTestCaseRunner.java:83)
[INFO] 	at com.sun.maven.junit.LocalTestCaseRunner.runTestCase(LocalTestCaseRunner.java:62)
[INFO] 	at com.sun.maven.junit.LocalTestCaseRunner.runTestCase(LocalTestCaseRunner.java:58)
[INFO] 	at sun.reflect.GeneratedMethodAccessor334.invoke(Unknown Source)
[INFO] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[INFO] 	at java.lang.reflect.Method.invoke(Method.java:597)
[INFO] 	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274)
[INFO] 	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:255)
[INFO] 	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
[INFO] 	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
[INFO] 	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
[INFO] 	at hudson.remoting.Request$2.run(Request.java:270)
[INFO] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
[INFO] 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
[INFO] 	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
[INFO] 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[INFO] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[INFO] 	at java.lang.Thread.run(Thread.java:662)
2012-08-29 08:51:07 -07:00
Jesse Glick 696f8b8687 More reasonable test names. 2012-08-23 16:19:23 -04:00
Stephen Connolly b1f0c9dddc This class is useless if these methods are protected
* The whole point of the rule is to allow access to the helper methods, so they need to be public

* also synced up with HudsonTestCase
2012-08-13 13:07:13 +01:00
Jesse Glick 77a5addcd1 Unused import. 2012-07-24 13:56:43 -04:00
Jesse Glick 8e14051c18 @since 2012-07-10 00:39:50 -03:00
Christoph Kutzinski a2f2ae9b2b I guess it was just an oversight from Kohsuke to put these tests under src/main as Maven won't run them if not located under src/test 2012-06-24 14:08:56 +02:00
Christoph Kutzinski 4b828e4e63 Disambiguate configRoundtrip call for the sake of the Eclipse compiler 2012-06-24 13:58:01 +02:00
Kohsuke Kawaguchi ffff8fb826 added a mechanism to run test without a Jenkins instance 2012-06-06 16:31:23 -07:00
Kohsuke Kawaguchi ddd6867125 Completed the new extension point.
Adding a test and fixed a broken databinding (because of SCM vs Scm)
2012-06-05 15:23:09 -07:00