jenkinsci / jenkins-test-harness

Unit test framework for Jenkins core and its plugins
https://www.jenkins.io/doc/developer/testing/
MIT License
109 stars 126 forks source link

Add option to dynamically update the baseline of the RJRInit plugin #780

Closed jtnord closed 4 months ago

jtnord commented 4 months ago

if the version of Jenkins used by RealJenkinsRuleInit has detached plugins in the version of Jenkins used for the test then this can unnecessarily pull in detached plugins.

In most cases this is harmless, but in some cases these plugins may be prevented from running under the test (e.g. testing FIPS and one of the detached plugins like eddsa is not FIPS complaint and blocks start-up).

The plugin itself has limited exposure to the Jenkins api (via hudson.plugin.Plugin and RealJenkinsRule$Init2).

Code running from the plugin tests inside RealJenkinsRule uses the uberClassloader and if the plugin was targeting a lower core (where the dependencies have been detached, they should still be included as this change only affects the version of the RealJenkinsRuleInit plugin.

this is a "future proof" (but potentially more risky) version of #779 (nb. the changes are not mutually exclusive)

consumed in https://github.com/jenkinsci/jenkins/pull/9353

Testing done

Submitter checklist

jtnord commented 4 months ago

closing in favor of #782