From ad6930265bd06d89eb45e910772d8f02dd5fd3ab Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Mon, 3 Jun 2024 14:51:48 -0700 Subject: [PATCH] Incremental build for testing (Jakarta) --- pom.xml | 18 +++++++++++++++--- .../plugins/saml/OpenSamlWrapperTest.java | 8 ++++---- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index dd8694b9..2241d0f1 100644 --- a/pom.xml +++ b/pom.xml @@ -46,9 +46,15 @@ under the License. 4 999999-SNAPSHOT - 2.401.3 + + 2.461-rc35012.3072a_f48c3df jenkinsci/${project.artifactId}-plugin 3.343.vb_63a_6c3df23c + + + 2214.v7769a_49f3381 + + 17 @@ -295,11 +301,17 @@ under the License. io.jenkins.tools.bom - bom-2.401.x - 2745.vc7b_fe4c876fa_ + bom-2.452.x + 3105.v672692894683 pom import + + + jakarta.servlet + jakarta.servlet-api + 5.0.0 + org.apache.santuario xmlsec diff --git a/src/test/java/org/jenkinsci/plugins/saml/OpenSamlWrapperTest.java b/src/test/java/org/jenkinsci/plugins/saml/OpenSamlWrapperTest.java index d2c8b23c..ae981e4a 100644 --- a/src/test/java/org/jenkinsci/plugins/saml/OpenSamlWrapperTest.java +++ b/src/test/java/org/jenkinsci/plugins/saml/OpenSamlWrapperTest.java @@ -18,15 +18,15 @@ package org.jenkinsci.plugins.saml; import hudson.util.Secret; +import jakarta.servlet.ServletException; import org.apache.commons.io.IOUtils; import org.junit.Rule; import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule; import org.kohsuke.stapler.HttpResponse; -import org.kohsuke.stapler.StaplerResponse; +import org.kohsuke.stapler.StaplerResponse2; import org.mockito.Mockito; -import javax.servlet.ServletException; import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; @@ -60,7 +60,7 @@ public void metadataWrapper() throws IOException, ServletException { jenkinsRule.jenkins.setSecurityRealm(samlSecurity); SamlSPMetadataWrapper samlSPMetadataWrapper = new SamlSPMetadataWrapper(samlSecurity.getSamlPluginConfig(), null, null); HttpResponse process = samlSPMetadataWrapper.get(); - StaplerResponse mockResponse = Mockito.mock(StaplerResponse.class); + StaplerResponse2 mockResponse = Mockito.mock(StaplerResponse2.class); StringWriter stringWriter = new StringWriter(); when(mockResponse.getWriter()).thenReturn(new PrintWriter(stringWriter)); process.generateResponse(null, mockResponse, null); @@ -89,7 +89,7 @@ public void metadataWrapperWitEncrytionConfigured() throws IOException, ServletE jenkinsRule.jenkins.setSecurityRealm(samlSecurity); SamlSPMetadataWrapper samlSPMetadataWrapper = new SamlSPMetadataWrapper(samlSecurity.getSamlPluginConfig(), null, null); HttpResponse process = samlSPMetadataWrapper.get(); - StaplerResponse mockResponse = Mockito.mock(StaplerResponse.class); + StaplerResponse2 mockResponse = Mockito.mock(StaplerResponse2.class); StringWriter stringWriter = new StringWriter(); when(mockResponse.getWriter()).thenReturn(new PrintWriter(stringWriter)); process.generateResponse(null, mockResponse, null);