Files
natsdotnet/tests/NATS.Server.Tests/Server/UtilitiesErrorConstantsParityBatch2Tests.cs
Joseph Doherty c30e67a69d Fix E2E test gaps and add comprehensive E2E + parity test suites
- Fix pull consumer fetch: send original stream subject in HMSG (not inbox)
  so NATS client distinguishes data messages from control messages
- Fix MaxAge expiry: add background timer in StreamManager for periodic pruning
- Fix JetStream wire format: Go-compatible anonymous objects with string enums,
  proper offset-based pagination for stream/consumer list APIs
- Add 42 E2E black-box tests (core messaging, auth, TLS, accounts, JetStream)
- Add ~1000 parity tests across all subsystems (gaps closure)
- Update gap inventory docs to reflect implementation status
2026-03-12 14:09:23 -04:00

29 lines
1.8 KiB
C#

using NATS.Server.Server;
namespace NATS.Server.Tests.Server;
public class UtilitiesErrorConstantsParityBatch2Tests
{
[Fact]
public void Error_constants_match_go_error_literals_batch2()
{
ServerErrorConstants.ErrBadQualifier.ShouldBe("bad qualifier");
ServerErrorConstants.ErrTooManyAccountConnections.ShouldBe("maximum account active connections exceeded");
ServerErrorConstants.ErrTooManySubs.ShouldBe("maximum subscriptions exceeded");
ServerErrorConstants.ErrTooManySubTokens.ShouldBe("subject has exceeded number of tokens limit");
ServerErrorConstants.ErrReservedAccount.ShouldBe("reserved account");
ServerErrorConstants.ErrMissingService.ShouldBe("service missing");
ServerErrorConstants.ErrBadServiceType.ShouldBe("bad service response type");
ServerErrorConstants.ErrBadSampling.ShouldBe("bad sampling percentage, should be 1-100");
ServerErrorConstants.ErrAccountResolverUpdateTooSoon.ShouldBe("account resolver update too soon");
ServerErrorConstants.ErrAccountResolverSameClaims.ShouldBe("account resolver no new claims");
ServerErrorConstants.ErrStreamImportAuthorization.ShouldBe("stream import not authorized");
ServerErrorConstants.ErrStreamImportBadPrefix.ShouldBe("stream import prefix can not contain wildcard tokens");
ServerErrorConstants.ErrStreamImportDuplicate.ShouldBe("stream import already exists");
ServerErrorConstants.ErrServiceImportAuthorization.ShouldBe("service import not authorized");
ServerErrorConstants.ErrImportFormsCycle.ShouldBe("import forms a cycle");
ServerErrorConstants.ErrCycleSearchDepth.ShouldBe("search cycle depth exhausted");
ServerErrorConstants.ErrNoTransforms.ShouldBe("no matching transforms available");
}
}