Skip to content

Commit

Permalink
Incremental build for testing (Jakarta)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Jun 3, 2024
1 parent a1d7002 commit ad69302
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
18 changes: 15 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ under the License.
<properties>
<revision>4</revision>
<changelist>999999-SNAPSHOT</changelist>
<jenkins.version>2.401.3</jenkins.version>
<!-- TODO https://ci.jenkins.io/job/Core/job/jenkins/job/jakarta/ -->
<jenkins.version>2.461-rc35012.3072a_f48c3df</jenkins.version>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
<hpi.compatibleSinceVersion>3.343.vb_63a_6c3df23c</hpi.compatibleSinceVersion>

<!-- TODO https://github.com/jenkinsci/jenkins-test-harness/pull/631 -->
<jenkins-test-harness.version>2214.v7769a_49f3381</jenkins-test-harness.version>
<!-- TODO JENKINS-73121 until in parent POM -->
<maven.compiler.release>17</maven.compiler.release>
</properties>

<licenses>
Expand Down Expand Up @@ -295,11 +301,17 @@ under the License.
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.401.x</artifactId>
<version>2745.vc7b_fe4c876fa_</version>
<artifactId>bom-2.452.x</artifactId>
<version>3105.v672692894683</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- TODO https://github.com/jenkinsci/plugin-pom/issues/936 -->
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ad69302

Please sign in to comment.