Skip to content

Commit

Permalink
[JENKINS-73316] Adapt SAML plugin for Jetty 12 (EE 9)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Sep 4, 2024
1 parent 135bbf1 commit bf682a4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 81 deletions.
74 changes: 0 additions & 74 deletions .github/workflows/codeql.yml

This file was deleted.

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>2265.v3da_49c8134d6</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

0 comments on commit bf682a4

Please sign in to comment.