From 4aa9b8b71507549c24476ac4eefda19935c9b3c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 12:52:31 +0000 Subject: [PATCH 1/2] Bump io.jenkins.tools.bom:bom-2.440.x Bumps [io.jenkins.tools.bom:bom-2.440.x](https://github.com/jenkinsci/bom) from 3208.vb_21177d4b_cd9 to 3413.v0d896b_76a_30d. - [Release notes](https://github.com/jenkinsci/bom/releases) - [Commits](https://github.com/jenkinsci/bom/commits) --- updated-dependencies: - dependency-name: io.jenkins.tools.bom:bom-2.440.x dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6537e94..ae5cdb3 100644 --- a/pom.xml +++ b/pom.xml @@ -82,7 +82,7 @@ THE SOFTWARE. io.jenkins.tools.bom bom-${jenkins.baseline}.x - 3208.vb_21177d4b_cd9 + 3413.v0d896b_76a_30d import pom From c75046c1078d3737b7b7cb3d4896285242d4b713 Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Tue, 1 Oct 2024 20:14:32 -0600 Subject: [PATCH 2/2] Adapt tests to handle FormException --- .../plugins/http_request/HttpRequestStepCredentialsTest.java | 3 ++- .../java/jenkins/plugins/http_request/HttpRequestTestBase.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/java/jenkins/plugins/http_request/HttpRequestStepCredentialsTest.java b/src/test/java/jenkins/plugins/http_request/HttpRequestStepCredentialsTest.java index 5c87653..9078612 100644 --- a/src/test/java/jenkins/plugins/http_request/HttpRequestStepCredentialsTest.java +++ b/src/test/java/jenkins/plugins/http_request/HttpRequestStepCredentialsTest.java @@ -12,6 +12,7 @@ import com.cloudbees.plugins.credentials.domains.Domain; import com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl; import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl; +import hudson.model.Descriptor.FormException; import hudson.model.Fingerprint; import hudson.model.Result; @@ -55,7 +56,7 @@ String getLogAsStringPlaintext(WorkflowRun f) throws java.io.IOException { private File p12simple; private File p12trusted; - private StandardCredentials getInvalidCredential() { + private StandardCredentials getInvalidCredential() throws FormException { String username = "bad-user"; String password = "bad-password"; CredentialsScope scope = CredentialsScope.GLOBAL; diff --git a/src/test/java/jenkins/plugins/http_request/HttpRequestTestBase.java b/src/test/java/jenkins/plugins/http_request/HttpRequestTestBase.java index f799cf9..3d89892 100644 --- a/src/test/java/jenkins/plugins/http_request/HttpRequestTestBase.java +++ b/src/test/java/jenkins/plugins/http_request/HttpRequestTestBase.java @@ -35,6 +35,7 @@ import org.junit.Rule; import org.jvnet.hudson.test.JenkinsRule; +import hudson.model.Descriptor.FormException; import com.cloudbees.plugins.credentials.Credentials; import com.cloudbees.plugins.credentials.CredentialsScope; import com.cloudbees.plugins.credentials.SystemCredentialsProvider; @@ -56,7 +57,7 @@ final String baseURL() { return SERVER.baseURL; } - void registerBasicCredential(String id, String username, String password) { + void registerBasicCredential(String id, String username, String password) throws FormException { credentials.get(Domain.global()).add( new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, id, "", username, password));