Commit Graph
1162 Commits
Author SHA1 Message Date
Wadeck Follonier ecf3095362 [JENKINS-64621] Fix zip regression (#5187) 2021-01-19 09:11:30 +00:00
Tim Jacomb ab5d044dcc Fix tests on newer java versions (#5182) 2021-01-18 16:04:12 +00:00
StefanSpiekerandBasil Crow 576eac39ae Fixed some deprecated warnings of mockito methods and minor cleanup (#5170)
* fixed some deprecated warnings of mockito methods and minor cleanup

* Update core/src/test/java/hudson/cli/handlers/ViewOptionHandlerTest.java

Co-authored-by: Basil Crow <me@basilcrow.com>

* store autoclosable mock and close it in tear_down method

* store autoclosable mock and close it in tear_down method

Co-authored-by: Basil Crow <me@basilcrow.com>
2021-01-17 14:55:18 +01:00
Tim Jacomb d6725e80f8 Ignore security test that fails in CI (#5178) 2021-01-17 09:03:05 +00:00
Jeff Thompson 71d2ecf1a4 [SECURITY-1452] 2021-01-11 16:53:00 +00:00
Daniel Beck b1ca284966 [SECURITY-2147] 2021-01-11 16:52:29 +00:00
Daniel Beck a890d68699 [SECURITY-2025] 2021-01-11 16:50:58 +00:00
Oleg Nenashev d69a9dd75f Merge pull request #5146 from StefanSpieker/deprecated_line_separator
Replaced deprecated IOUtils.LINE_SEPARATOR with System.lineSeparator()
2021-01-05 07:53:30 +01:00
Oleg Nenashev d6d098eb96 Merge pull request #5147 from StefanSpieker/minor_spotbugs
Minor spotbugs issues
2021-01-05 07:49:01 +01:00
Stefan Spieker 5fb8f1278d removed superflous import 2020-12-31 16:08:31 +01:00
Stefan Spieker 63c0ae46db fixed SpotBugs DMI_RANDOM_USED_ONLY_ONCE 2020-12-31 16:05:26 +01:00
Stefan Spieker 71e689c698 fixed SpotBugs JUA_DONT_ASSERT_INSTANCEOF_IN_TESTS 2020-12-31 16:01:19 +01:00
Stefan Spieker 1e0488f19c fixed SpotBugs VA_FORMAT_STRING_USES_NEWLINE 2020-12-31 15:49:03 +01:00
Stefan Spieker e75345a85e replaced deprecated IOUtils.LINE_SEPARATOR with System.lineSeparator() 2020-12-31 15:40:38 +01:00
Basil Crow 64dbdbc4f5 Remove unused imports 2020-12-19 13:10:38 -08:00
Basil Crow 7876e3ca85 Use JUnit 5 assertions from JUnit 5 test 2020-12-19 13:05:01 -08:00
Basil Crow c7c623d502 Add missing @Test annotations 2020-12-19 12:18:08 -08:00
Basil Crow e8bc4e4726 Simplify JUnit assertions 2020-12-19 12:18:08 -08:00
Basil Crow a51b211661 Remove getClass() call on Class instance 2020-12-19 12:18:08 -08:00
Oleg Nenashev 152682c157 Merge pull request #5109 from basil/improvements
Code cleanup
2020-12-19 20:51:40 +01:00
James NordandJesse Glick f7884d3513 [JENKINS-64390] make FieldUtils behave as it used to (#5105)
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
2020-12-13 20:35:21 +00:00
Basil Crow 7117a5379e Remove unnecessary casts 2020-12-11 21:34:22 -08:00
Basil Crow 39c22138d7 Remove redundant type arguments 2020-12-11 21:34:22 -08:00
Basil Crow 578a5e8377 Use Collections#singletonList where possible 2020-12-11 21:34:22 -08:00
Basil Crow 2278d3ae27 Remove unnecessary interface modifiers 2020-12-11 20:50:51 -08:00
Basil Crow 2dbfbd9607 Remove redundant final modifier from private methods 2020-12-11 20:46:12 -08:00
Stefan Spieker a31191a326 replaced deprecated Exception.none with asserThrows 2020-12-06 12:16:23 +01:00
418fb5b565 Hacktoberfest - ParametersDefinition add equals and hashCode (#5014)
Co-authored-by: Zbynek Konecny <zbynek1729@gmail.com>
Co-authored-by: Ilya Gulyaev <ilya.gulyaev@nordigy.ru>
Co-authored-by: Raihaan Shouhell <raihaanhimself@gmail.com>
2020-11-26 09:01:11 +00:00
Josh Soref 6c6d787f26 [JENKINS-41891] Resource root url cleanup (#4294) 2020-11-09 22:15:01 +00:00
Jesse GlickandBasil Crow 77f24bfb9a [JEP-228] Unforking XStream (#4944)
* Unforking XStream

* Some overrides missing from MapperDelegate

* [XSTR-762] writeReplace & readResolve must be accessible to be used from subclasses

* DomElement.click overloads changed incompatibly

* Giving up on ToolInstallation being Serializable.
Fixing MavenInstallation accordingly.
AntInstallation was already fixed: https://github.com/jenkinsci/ant-plugin/commit/c957dca4cd7789e3918e90ae020687aeaeea998e

* Relaxing message assertion in RobustReflectionConverter.randomExceptionsReported

* Picking up https://github.com/jenkinsci/matrix-auth-plugin/pull/89 caught via JobTest

* https://github.com/jenkinsci/jenkins-test-harness/pull/243 released

* Another case forgotten in 0e5aeec4cc

* XStream has SecurityMapper, but we have our own system already, so suppress warning

* GetMavenVersion was also serializing its outer class

* Trying to make ToolInstallation serializable compatible

* Avoid throwing IOException from PersistedList.inModified for common cases covered by https://github.com/jenkinsci/jenkins-test-harness/pull/243

* Found a way to avoid looking up XStream.converterRegistry by reflection

* XStream2Test.crashXstream now throwing ConversionException, not ForbiddenClassException

* Noting which version of the parent POM has https://github.com/jenkinsci/jenkins-test-harness/pull/243

* Refreshed Javadoc for XStream2

* The simplest solution to JENKINS-19561 seems to be to stop using autodetectAnnotations

* Fixing some deprecations in Robust*Converter

* Display OldDataMonitor errors from RobustReflectionConverter during functional tests

* Stray digit in test name

* Added XStream2AnnotationTest to clearly document incompatibility

* Picking up release of https://github.com/jenkinsci/matrix-auth-plugin/pull/89

Co-authored-by: Basil Crow <me@basilcrow.com>

Co-authored-by: Basil Crow <me@basilcrow.com>
2020-11-06 15:03:23 -06:00
a9ca5ef3d4 [JEP-227] Replace Acegi Security with Spring Security & upgrade Spring Framework (#4848)
Replacing Acegi Security with Spring Security

Co-authored-by: Tim Jacomb <timjacomb1+github@gmail.com>
Co-authored-by: James Nord <jtnord@users.noreply.github.com>
2020-11-06 11:30:25 -07:00
Oleg Nenashev 748e8b2b2d Merge pull request #5028 from Wadeck/JENKINS-60563_consistent_hash
[JENKINS-60563] Replace MD5 with SHA-256 in ConsistentHash
2020-11-06 12:00:07 +01:00
Raihaan Shouhellandres0nance e83e6a11dc JDK 11.0.9 / 8.0.272+ compatible FunctionsTest#printThrowable() (#5033)
* JDK 11.0.9 / 8.0.272+ FunctionsTest#printThrowable()

* Ensure proper older java 11 backwards compatibility

Co-authored-by: res0nance <res0nance@users.noreply.github.com>
2020-11-01 10:47:12 +08:00
Tim Jacomb f4942b3bc4 Merge pull request #5022 from darinpope/trim-admin-address
Hacktoberfest: trim the adminAddress before saving
2020-10-26 20:25:10 +00:00
Jesse Glick a26adf1d57 Commenting out part of FunctionsTest.printThrowable which fails in JDK 11.0.9+ 2020-10-25 22:57:27 +00:00
Wadeck Follonier 30f6514935 [JENKINS-60563] Replace MD5 with SHA-256 in ConsistentHash
- Also update outdated link
- Reformat some of the code
- Adjust the tests
- Ignore the performance test
- Correct typos
2020-10-24 18:05:24 +02:00
Darin Pope 0ed2cc8b9b trim the adminAddress before saving
Signed-off-by: Darin Pope <darin@planetpope.com>
2020-10-21 14:29:57 -04:00
StefanSpiekerandRaihaan Shouhell 4499ad6ffd Replace deprecated NullOutputStream (#4989)
Co-authored-by: Raihaan Shouhell <raihaanhimself@gmail.com>
2020-10-13 08:10:55 +01:00
Oleg Nenashev 17236daa12 Merge pull request #4970 from Vlatombe/JENKINS-63828
[JENKINS-63828] It is legal to have a CloudProvisioningListener not implementing `canProvision`
2020-10-13 05:30:57 +02:00
Tomek Szmytka dd134ef84e Shortlog strip console notes (#4905)
* Do not render parts of serialized a ConsoleNote if output begins in the middle of it. Generalize finding pre/postamble

* Do not render parts of serialized a ConsoleNote while writing non-html output as well. Test sample script output.

* Add positive scenario test case. Fine-tune implementation

* Render progressive output with explicitly set no preBuffer. Ensure only the relevant lines get processed

* Revert pre-buffer functionality.
Keep tests in adjusted form.

* Push offset forward to start writing log on line beginning

* Move and fine-tune tests. Avoid rendering no output in case offset falls on last line

* Dont render whole log on offset on the last line. It might be problematic for really large logs

* Style adjustments
2020-10-08 15:29:47 +02:00
Vincent Latombe 4ff3f04436 [JENKINS-63828] It is legal to have a CloudProvisioningListener not implementing canProvision
I got confused in
https://github.com/jenkinsci/jenkins/commit/3992a30efb1abf697cae8e02f9e81dd04b92b135
by Cloud#canProvision which was abstract vs.
CloudProvisioningListener#canProvision which wasn't and was returning
null.
2020-10-07 14:44:15 +02:00
Vincent Latombe a75306f950 [JENKINS-63828] Fix expected signature for CloudProvisioningListener#canProvision (#4955)
* [JENKINS-63828] Fix expected signature for CloudProvisioningListener#canProvision

* Polish
2020-10-05 12:29:20 +02:00
Vincent LatombeandJesse Glick 3992a30efb Add CloudState to be passed to Cloud#provision and Cloud#canProvision methods. (#4922)
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
2020-09-25 21:34:05 +01:00
StefanSpiekerandMark Waite dcc9a924d8 Converting tests to junit5 (#4699)
* started converting tests to junit5

* replaced TempFolder with JUnit TempDir

* migrated some test classes to JUnit5

* migrated a parameterized testclass to junit5

* Update core/pom.xml

Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>

* replaced junit4 with junit5-vintage engine

Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
2020-07-20 23:14:21 +02:00
Tim Van Holder 9c088c27f2 [JENKINS-62723] Further fix for Util.isOverridden
This handles the remaining case (override provided by default implementation of an interface).
2020-07-07 22:23:40 +02:00
Tim Van Holder ccc0e34724 [JENKINS-62723] Improve Util.isOverridden
It will now deal with final/abstract methods appropriately.
It will also clearly report bad arguments (base not base of derived, or base does not declare the method).
Added a unit test for interface cases.

Small gap to be looked into: overrides provided via default implementation of a (derived) interface.
2020-07-07 22:09:59 +02:00
Jesse Glick 94eaecbe93 Make ErrorCollector actually work 2020-07-07 10:26:29 -04:00
Jesse Glick b98fe97940 [JENKINS-62723] Demonstrating that Util.isOverridden is broken on final overrides 2020-07-07 10:15:51 -04:00
Tim Jacomb e9dc2694db JENKINS-41805 Cleanup workspace suffixes (#4824) 2020-07-06 19:37:30 +01:00
Jeff Thompson 55d1b9e387 [JENKINS-62889] ParameterDefinition check for validity (#4826) 2020-07-06 07:55:52 +01:00