fix: resolve 19 JetStream test failures across 5 root causes

- HandleList: populate StreamNames/ConsumerNames alongside info lists
- ValidateConfigUpdate: allow clearing mirror/sources, accept even replicas
- ToWireFormat: add AccountInfo branch for $JS.API.INFO responses
- UpdateStream fixture: preserve existing retention policy on update
- Integration test: fix assertion to match valid account info response
This commit is contained in:
Joseph Doherty
2026-03-13 01:14:21 -04:00
parent 3445a055eb
commit e9c86c51c3
8 changed files with 36 additions and 13 deletions
@@ -82,6 +82,7 @@ public static class ConsumerApiHandlers
return new JetStreamApiResponse
{
ConsumerInfoList = page,
ConsumerNames = page.Select(c => c.Name ?? string.Empty).ToList(),
PaginationTotal = all.Count,
PaginationOffset = offset,
};
@@ -123,6 +123,7 @@ public static class StreamApiHandlers
return new JetStreamApiResponse
{
StreamInfoList = page,
StreamNames = page.Select(s => s.Config.Name).ToList(),
PaginationTotal = all.Count,
PaginationOffset = offset,
};
@@ -77,6 +77,16 @@ public sealed class JetStreamApiResponse
if (Error != null)
return new { error = Error };
if (AccountInfo != null)
{
return new
{
type = "io.nats.jetstream.api.v1.account_info_response",
streams = AccountInfo.Streams,
consumers = AccountInfo.Consumers,
};
}
if (StreamInfoList != null)
{
var wireStreams = StreamInfoList.Select(s => new