-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Let ConfidentialKey & Secret do something from unit tests #4603
Conversation
…s, used by RekeySecretAdminMonitorTest, also copied in publish-over-*-plugin
Got some test errors in |
…tialStore; this also lets the mock use a fixed seed
Hmm, still seeing CI failures in |
Flake, presumably:
|
let's give it one more build |
Found it frustrating that I could not, for example, call any method on
Secret
fromjshell
becauseConfidentialStore
does not work withoutJenkins
. Simpler to introduce an in-memory mock for such cases. (DefaultConfidentialStore
already has its own test coverage. LeavingConfidentialStore.TEST
to avoid breaking PCT on https://github.com/jenkinsci/credentials-plugin/blob/6f710a7e30156e94aff8a3c6c6799cef04ad35df/src/test/java/jenkins/security/ConfidentialStoreRule.java & https://github.com/jenkinsci/kubernetes-cli-plugin/blob/4f368d86f28a625c8c0c3bf5a4c25304c9d88cfc/src/test/java/jenkins/security/ConfidentialStoreRule.java.)Proposed changelog entries
Secret
andConfidentialKey
implementations can now be used from unit tests withoutJenkinsRule
.