Skip to content

Commit ac61fd8

Browse files
committed
test: adapt SEP-2260 association tests to ServerPeerInfo
Rebase onto 3.0.0: RoleClient::PeerInfo is now ServerPeerInfo (#1065) and its constructor takes the protocol version directly.
1 parent a3c5b65 commit ac61fd8

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

crates/rmcp/src/service/client.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2236,13 +2236,14 @@ mod sep2260_association_tests {
22362236
))
22372237
}
22382238

2239-
fn server_info(version: ProtocolVersion) -> ServerInfo {
2240-
let mut info = ServerInfo::new(ServerCapabilities::default());
2241-
info.protocol_version = version;
2242-
info
2239+
fn server_info(version: ProtocolVersion) -> ServerPeerInfo {
2240+
ServerPeerInfo::new(version, ServerCapabilities::default())
22432241
}
22442242

2245-
fn enforce(info: &ServerInfo, association: PeerRequestAssociation) -> Result<(), ErrorData> {
2243+
fn enforce(
2244+
info: &ServerPeerInfo,
2245+
association: PeerRequestAssociation,
2246+
) -> Result<(), ErrorData> {
22462247
RoleClient::enforce_peer_request_association(&sampling_request(), Some(info), association)
22472248
}
22482249

0 commit comments

Comments
 (0)