From db453a813e1d67dcb102273db7d918a40da00920 Mon Sep 17 00:00:00 2001 From: James Nord Date: Fri, 21 Jun 2024 15:36:38 +0100 Subject: [PATCH] do not rely on long deprecated FileOnMasterKeyStoreSource --- .../credentialsbinding/impl/CertificateMultiBindingTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/jenkinsci/plugins/credentialsbinding/impl/CertificateMultiBindingTest.java b/src/test/java/org/jenkinsci/plugins/credentialsbinding/impl/CertificateMultiBindingTest.java index 3701c507..8c696e58 100644 --- a/src/test/java/org/jenkinsci/plugins/credentialsbinding/impl/CertificateMultiBindingTest.java +++ b/src/test/java/org/jenkinsci/plugins/credentialsbinding/impl/CertificateMultiBindingTest.java @@ -62,6 +62,7 @@ import hudson.FilePath; import hudson.Functions; +import hudson.model.FileParameterValue; import hudson.model.FreeStyleBuild; import hudson.model.FreeStyleProject; import hudson.model.Item; @@ -97,7 +98,7 @@ public void basics() throws Exception { String alias = "androiddebugkey"; String password = "android"; StandardCertificateCredentials c = new CertificateCredentialsImpl(CredentialsScope.GLOBAL, null, alias, - password, new CertificateCredentialsImpl.FileOnMasterKeyStoreSource(certificate.getAbsolutePath())); + password, new CertificateCredentialsImpl.UploadedKeyStoreSource(new FileParameterValue.FileItemImpl(certificate), null)); CredentialsProvider.lookupStores(r.jenkins).iterator().next().addCredentials(Domain.global(), c); FreeStyleProject p = r.createFreeStyleProject(); CertificateMultiBinding binding = new CertificateMultiBinding("keystore", c.getId());