Skip to content
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

RealJenkinsRule.addSyntheticPlugin #659

Merged
merged 13 commits into from
Nov 19, 2024
Merged

Conversation

jglick
Copy link
Member

@jglick jglick commented Sep 27, 2023

Fixes #623. Unfortunately I have hit a roadblock: even when RoundEnvironment.processingOver, *.class files for sources have not yet been written to disk, so it is impossible to pack them into the plugin archive.

@jglick

This comment was marked as outdated.

@jglick jglick changed the title Sketch of @TestPlugin RealJenkinsRule.addSyntheticPlugin Sep 28, 2023
@Vlatombe
Copy link
Member

Looks good, why is it still in draft?

@jglick
Copy link
Member Author

jglick commented Nov 17, 2023

why is it still in draft?

Because I never actually had a use case for it—the proprietary change for which I had planned to use it turned out to be testable by just injecting an extension loaded from the test class loader. (In that case Descriptor was not needed, nor did the test extension need to be deserialized, etc.) Do you have a use case for this? If so, I am happy to take it out of draft.

@jglick jglick marked this pull request as ready for review November 18, 2024 18:57
@jglick
Copy link
Member Author

jglick commented Nov 18, 2024

I now have a definite use case for this utility in a proprietary plugin: a case where I need for the test to run a mock @Extension which must be active before Jenkins completes initialization (and thus before I can runRemotely something to install it).

@jglick jglick requested a review from Vlatombe November 19, 2024 18:47
@jglick jglick merged commit 13b7b3d into jenkinsci:master Nov 19, 2024
15 checks passed
@jglick jglick deleted the TestPlugin branch November 19, 2024 20:14
@jglick jglick mentioned this pull request Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test-only plugin from source in RealJenkinsRule
3 participants