Client Auth Conformance Tests - change parent POM (#827)
- Small javaformat fixes - Closes gh-827 Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
This commit is contained in:
parent
46bacda3c3
commit
81a18ed02e
4 changed files with 34 additions and 17 deletions
|
|
@ -67,7 +67,7 @@ cd conformance-tests/client-spring-http-client
|
|||
|
||||
This creates an executable JAR at:
|
||||
```
|
||||
target/client-spring-http-client-0.18.0-SNAPSHOT.jar
|
||||
target/client-spring-http-client-1.1.0-SNAPSHOT.jar
|
||||
```
|
||||
|
||||
## Running Tests
|
||||
|
|
@ -79,7 +79,7 @@ Run the full auth suite:
|
|||
```bash
|
||||
npx @modelcontextprotocol/conformance@0.1.15 client \
|
||||
--spec-version 2025-11-25 \
|
||||
--command "java -jar conformance-tests/client-spring-http-client/target/client-spring-http-client-0.18.0-SNAPSHOT.jar" \
|
||||
--command "java -jar conformance-tests/client-spring-http-client/target/client-spring-http-client-1.1.0-SNAPSHOT.jar" \
|
||||
--suite auth
|
||||
```
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ Run a single scenario:
|
|||
```bash
|
||||
npx @modelcontextprotocol/conformance@0.1.15 client \
|
||||
--spec-version 2025-11-25 \
|
||||
--command "java -jar conformance-tests/client-spring-http-client/target/client-spring-http-client-0.18.0-SNAPSHOT.jar" \
|
||||
--command "java -jar conformance-tests/client-spring-http-client/target/client-spring-http-client-1.1.0-SNAPSHOT.jar" \
|
||||
--scenario auth/metadata-default
|
||||
```
|
||||
|
||||
|
|
@ -97,7 +97,7 @@ Run with verbose output:
|
|||
```bash
|
||||
npx @modelcontextprotocol/conformance@0.1.15 client \
|
||||
--spec-version 2025-11-25 \
|
||||
--command "java -jar conformance-tests/client-spring-http-client/target/client-spring-http-client-0.18.0-SNAPSHOT.jar" \
|
||||
--command "java -jar conformance-tests/client-spring-http-client/target/client-spring-http-client-1.1.0-SNAPSHOT.jar" \
|
||||
--scenario auth/metadata-default \
|
||||
--verbose
|
||||
```
|
||||
|
|
@ -108,7 +108,7 @@ You can also run the client manually if you have a test server:
|
|||
|
||||
```bash
|
||||
export MCP_CONFORMANCE_SCENARIO=auth/metadata-default
|
||||
java -jar conformance-tests/client-spring-http-client/target/client-spring-http-client-0.18.0-SNAPSHOT.jar http://localhost:3000/mcp
|
||||
java -jar conformance-tests/client-spring-http-client/target/client-spring-http-client-1.1.0-SNAPSHOT.jar http://localhost:3000/mcp
|
||||
```
|
||||
|
||||
## Known Issues
|
||||
|
|
|
|||
|
|
@ -4,14 +4,11 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>4.0.2</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
<groupId>io.modelcontextprotocol.sdk</groupId>
|
||||
<artifactId>conformance-tests</artifactId>
|
||||
<version>1.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<groupId>io.modelcontextprotocol.sdk</groupId>
|
||||
<artifactId>client-spring-http-client</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>MCP Conformance Tests - Spring HTTP Client</name>
|
||||
<description>Spring HTTP Client conformance tests for the Java MCP SDK</description>
|
||||
|
|
@ -25,10 +22,23 @@
|
|||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<spring-boot.version>4.0.2</spring-boot.version>
|
||||
<spring-ai.version>2.0.0-M2</spring-ai.version>
|
||||
<maven.deploy.skip>true</maven.deploy.skip>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
@ -63,6 +73,14 @@
|
|||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ public class DefaultConfiguration {
|
|||
|
||||
@Bean
|
||||
DefaultScenario defaultScenario(McpClientRegistrationRepository clientRegistrationRepository,
|
||||
ServletWebServerApplicationContext serverCtx,
|
||||
OAuth2AuthorizedClientRepository oAuth2AuthorizedClientRepository) {
|
||||
ServletWebServerApplicationContext serverCtx,
|
||||
OAuth2AuthorizedClientRepository oAuth2AuthorizedClientRepository) {
|
||||
return new DefaultScenario(clientRegistrationRepository, serverCtx, oAuth2AuthorizedClientRepository);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,8 +29,7 @@ import static io.modelcontextprotocol.conformance.client.ConformanceSpringClient
|
|||
|
||||
public class DefaultScenario implements Scenario {
|
||||
|
||||
private static final Logger log = LoggerFactory
|
||||
.getLogger(DefaultScenario.class);
|
||||
private static final Logger log = LoggerFactory.getLogger(DefaultScenario.class);
|
||||
|
||||
private final ServletWebServerApplicationContext serverCtx;
|
||||
|
||||
|
|
@ -39,8 +38,8 @@ public class DefaultScenario implements Scenario {
|
|||
private McpSyncClient client;
|
||||
|
||||
public DefaultScenario(McpClientRegistrationRepository clientRegistrationRepository,
|
||||
ServletWebServerApplicationContext serverCtx,
|
||||
OAuth2AuthorizedClientRepository oAuth2AuthorizedClientRepository) {
|
||||
ServletWebServerApplicationContext serverCtx,
|
||||
OAuth2AuthorizedClientRepository oAuth2AuthorizedClientRepository) {
|
||||
this.serverCtx = serverCtx;
|
||||
this.authorizedClientManager = new DefaultOAuth2AuthorizedClientManager(clientRegistrationRepository,
|
||||
oAuth2AuthorizedClientRepository);
|
||||
|
|
|
|||
Loading…
Reference in a new issue