Co-authored-by: Stephen Halter <halter73@gmail.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: tarekgh <tarek.mahmoud.sayed@gmail.com>
This commit is contained in:
parent
6787c0cc19
commit
26f60ab7f4
1 changed files with 894 additions and 101 deletions
|
|
@ -98,10 +98,10 @@ public sealed class RawStreamConformanceTests : LoggedTest, IAsyncDisposable
|
|||
.ToList();
|
||||
Assert.Contains(McpProtocolVersions.July2026ProtocolVersion, supportedVersions);
|
||||
|
||||
// Capabilities and serverInfo are mandatory in DiscoverResult per SEP-2575.
|
||||
// Capabilities are mandatory in DiscoverResult; server identity is result metadata.
|
||||
Assert.NotNull(result["capabilities"]);
|
||||
Assert.NotNull(result["serverInfo"]);
|
||||
Assert.Equal("raw-conformance-server", result["serverInfo"]!["name"]!.GetValue<string>());
|
||||
Assert.Null(result["serverInfo"]);
|
||||
Assert.Equal("raw-conformance-server", result["_meta"]![MetaKeys.ServerInfo]!["name"]!.GetValue<string>());
|
||||
|
||||
// Spec PR #2855 makes ttlMs and cacheScope required on DiscoverResult; the server emits the
|
||||
// safest defaults (immediately stale, not shareable) when the application hasn't customized.
|
||||
|
|
@ -126,6 +126,7 @@ public sealed class RawStreamConformanceTests : LoggedTest, IAsyncDisposable
|
|||
var content = result!["content"]!.AsArray();
|
||||
Assert.Single(content);
|
||||
Assert.Equal("echo:hello", content[0]!["text"]!.GetValue<string>());
|
||||
Assert.Equal("raw-conformance-server", result["_meta"]![MetaKeys.ServerInfo]!["name"]!.GetValue<string>());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
@ -146,7 +147,7 @@ public sealed class RawStreamConformanceTests : LoggedTest, IAsyncDisposable
|
|||
Assert.NotNull(data);
|
||||
Assert.Equal("9999-99-99", data!["requested"]!.GetValue<string>());
|
||||
var supported = data["supported"]!.AsArray().Select(n => n!.GetValue<string>()).ToList();
|
||||
Assert.Contains(McpProtocolVersions.July2026ProtocolVersion, supported);
|
||||
Assert.Equal([McpProtocolVersions.July2026ProtocolVersion], supported);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
@ -161,6 +162,7 @@ public sealed class RawStreamConformanceTests : LoggedTest, IAsyncDisposable
|
|||
var result = response["result"];
|
||||
Assert.NotNull(result);
|
||||
Assert.Equal("2025-11-25", result!["protocolVersion"]!.GetValue<string>());
|
||||
Assert.Null(result["_meta"]?[MetaKeys.ServerInfo]);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
|
|||
Loading…
Reference in a new issue