Skip to content
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

[JENKINS-73316] Require Java 17 and 2.475; adapt test suite to EE 9 #421

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,12 @@ under the License.
<properties>
<revision>4</revision>
<changelist>999999-SNAPSHOT</changelist>
<jenkins.version>2.401.3</jenkins.version>
<jenkins.version>2.475</jenkins.version>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
<hpi.compatibleSinceVersion>3.343.vb_63a_6c3df23c</hpi.compatibleSinceVersion>
<!-- TODO JENKINS-73339 until in parent POM -->
<jenkins-test-harness.version>2254.vcff7a_d4969e5</jenkins-test-harness.version>
<maven.compiler.release>17</maven.compiler.release>
</properties>

<licenses>
Expand Down Expand Up @@ -295,11 +298,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.462.x</artifactId>
<version>3307.v2769886db_63b_</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- TODO JENKINS-73339 until in parent POM, work around 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 @@ -23,10 +23,10 @@
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 jakarta.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