test(batch0): port account/auth/options implementable tests
This commit is contained in:
@@ -108,20 +108,10 @@ public sealed class AuthCalloutTests
|
|||||||
server.ShouldNotBeNull();
|
server.ShouldNotBeNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact] // T:117
|
[Fact(Skip = "DEFERRED: requires full operator-mode auth callout integration runtime")] // T:117
|
||||||
public void AuthCalloutOperatorModeBasics_ShouldSucceed()
|
public void AuthCalloutOperatorModeBasics_ShouldSucceed()
|
||||||
{
|
{
|
||||||
var (server, err) = NatsServer.NewServer(new ServerOptions());
|
// DEFERRED: requires end-to-end operator resolver + auth service runtime setup.
|
||||||
err.ShouldBeNull();
|
|
||||||
|
|
||||||
var opts = new ServerOptions
|
|
||||||
{
|
|
||||||
TrustedOperators = [new object()],
|
|
||||||
AuthCallout = new AuthCalloutOpts { Account = "AUTH", Issuer = "OP" },
|
|
||||||
};
|
|
||||||
|
|
||||||
Should.Throw<NotImplementedException>(() =>
|
|
||||||
server!.ProcessClientOrLeafAuthentication(CreateClient(1, "h", "u", "p"), opts));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact] // T:120
|
[Fact] // T:120
|
||||||
@@ -228,51 +218,22 @@ public sealed class AuthCalloutTests
|
|||||||
req.ConnectOptions!.Username.ShouldBe("leaf-user");
|
req.ConnectOptions!.Username.ShouldBe("leaf-user");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact] // T:138
|
[Fact(Skip = "DEFERRED: requires leafnode auth callout integration runtime")] // T:138
|
||||||
public void AuthCalloutLeafNodeAndConfigMode_ShouldSucceed()
|
public void AuthCalloutLeafNodeAndConfigMode_ShouldSucceed()
|
||||||
{
|
{
|
||||||
var (server, err) = NatsServer.NewServer(new ServerOptions());
|
// DEFERRED: requires multi-server leafnode handshake + callout service.
|
||||||
err.ShouldBeNull();
|
|
||||||
|
|
||||||
var opts = new ServerOptions
|
|
||||||
{
|
|
||||||
AuthCallout = new AuthCalloutOpts { Account = "AUTH" },
|
|
||||||
};
|
|
||||||
|
|
||||||
Should.Throw<NotImplementedException>(() =>
|
|
||||||
server!.ProcessClientOrLeafAuthentication(CreateClient(21, "leaf", kind: ClientKind.Leaf), opts));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact] // T:140
|
[Fact(Skip = "DEFERRED: requires operator-mode credential mismatch integration runtime")] // T:140
|
||||||
public void AuthCalloutOperatorModeMismatchedCalloutCreds_ShouldSucceed()
|
public void AuthCalloutOperatorModeMismatchedCalloutCreds_ShouldSucceed()
|
||||||
{
|
{
|
||||||
var (server, err) = NatsServer.NewServer(new ServerOptions());
|
// DEFERRED: requires connected external auth service with mismatched user creds.
|
||||||
err.ShouldBeNull();
|
|
||||||
|
|
||||||
var opts = new ServerOptions
|
|
||||||
{
|
|
||||||
TrustedOperators = [new object()],
|
|
||||||
AuthCallout = new AuthCalloutOpts { Account = "AUTH", Issuer = "OP", AuthUsers = ["bad-user"] },
|
|
||||||
};
|
|
||||||
|
|
||||||
Should.Throw<NotImplementedException>(() =>
|
|
||||||
server!.ProcessClientOrLeafAuthentication(CreateClient(30, "h", "user", "pass"), opts));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact] // T:141
|
[Fact(Skip = "DEFERRED: requires leafnode+operator mismatched credentials integration runtime")] // T:141
|
||||||
public void AuthCalloutLeafNodeOperatorModeMismatchedCreds_ShouldSucceed()
|
public void AuthCalloutLeafNodeOperatorModeMismatchedCreds_ShouldSucceed()
|
||||||
{
|
{
|
||||||
var (server, err) = NatsServer.NewServer(new ServerOptions());
|
// DEFERRED: requires multiple servers and live leafnode credential exchange.
|
||||||
err.ShouldBeNull();
|
|
||||||
|
|
||||||
var opts = new ServerOptions
|
|
||||||
{
|
|
||||||
TrustedOperators = [new object()],
|
|
||||||
AuthCallout = new AuthCalloutOpts { Account = "AUTH", Issuer = "OP", AuthUsers = ["leaf-bad"] },
|
|
||||||
};
|
|
||||||
|
|
||||||
Should.Throw<NotImplementedException>(() =>
|
|
||||||
server!.ProcessClientOrLeafAuthentication(CreateClient(31, "leaf", "lu", "lp", kind: ClientKind.Leaf), opts));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ClientConnection CreateClient(
|
private static ClientConnection CreateClient(
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ public sealed class AuthHandlerTests
|
|||||||
};
|
};
|
||||||
|
|
||||||
AuthHandler.ValidateNoAuthUser(opts, "alice").ShouldBeNull();
|
AuthHandler.ValidateNoAuthUser(opts, "alice").ShouldBeNull();
|
||||||
|
var missingUser = AuthHandler.ValidateNoAuthUser(opts, "bob");
|
||||||
|
missingUser.ShouldNotBeNull();
|
||||||
|
missingUser!.Message.ShouldContain("not present as user or nkey");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact] // T:150
|
[Fact] // T:150
|
||||||
@@ -27,6 +30,7 @@ public sealed class AuthHandlerTests
|
|||||||
};
|
};
|
||||||
|
|
||||||
AuthHandler.ValidateNoAuthUser(opts, "NKEY1").ShouldBeNull();
|
AuthHandler.ValidateNoAuthUser(opts, "NKEY1").ShouldBeNull();
|
||||||
|
AuthHandler.ValidateNoAuthUser(opts, "NKEY2").ShouldNotBeNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact] // T:152
|
[Fact] // T:152
|
||||||
|
|||||||
BIN
porting.db
BIN
porting.db
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
# NATS .NET Porting Status Report
|
# NATS .NET Porting Status Report
|
||||||
|
|
||||||
Generated: 2026-02-28 02:41:54 UTC
|
Generated: 2026-02-28 09:39:14 UTC
|
||||||
|
|
||||||
## Modules (12 total)
|
## Modules (12 total)
|
||||||
|
|
||||||
@@ -21,9 +21,9 @@ Generated: 2026-02-28 02:41:54 UTC
|
|||||||
|
|
||||||
| Status | Count |
|
| Status | Count |
|
||||||
|--------|-------|
|
|--------|-------|
|
||||||
| deferred | 2640 |
|
| deferred | 2555 |
|
||||||
| n_a | 187 |
|
| n_a | 187 |
|
||||||
| verified | 430 |
|
| verified | 515 |
|
||||||
|
|
||||||
## Library Mappings (36 total)
|
## Library Mappings (36 total)
|
||||||
|
|
||||||
@@ -34,4 +34,4 @@ Generated: 2026-02-28 02:41:54 UTC
|
|||||||
|
|
||||||
## Overall Progress
|
## Overall Progress
|
||||||
|
|
||||||
**1924/6942 items complete (27.7%)**
|
**2009/6942 items complete (28.9%)**
|
||||||
|
|||||||
37
reports/report_564b91d.md
Normal file
37
reports/report_564b91d.md
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# NATS .NET Porting Status Report
|
||||||
|
|
||||||
|
Generated: 2026-02-28 09:39:14 UTC
|
||||||
|
|
||||||
|
## Modules (12 total)
|
||||||
|
|
||||||
|
| Status | Count |
|
||||||
|
|--------|-------|
|
||||||
|
| verified | 12 |
|
||||||
|
|
||||||
|
## Features (3673 total)
|
||||||
|
|
||||||
|
| Status | Count |
|
||||||
|
|--------|-------|
|
||||||
|
| deferred | 2377 |
|
||||||
|
| n_a | 24 |
|
||||||
|
| stub | 1 |
|
||||||
|
| verified | 1271 |
|
||||||
|
|
||||||
|
## Unit Tests (3257 total)
|
||||||
|
|
||||||
|
| Status | Count |
|
||||||
|
|--------|-------|
|
||||||
|
| deferred | 2555 |
|
||||||
|
| n_a | 187 |
|
||||||
|
| verified | 515 |
|
||||||
|
|
||||||
|
## Library Mappings (36 total)
|
||||||
|
|
||||||
|
| Status | Count |
|
||||||
|
|--------|-------|
|
||||||
|
| mapped | 36 |
|
||||||
|
|
||||||
|
|
||||||
|
## Overall Progress
|
||||||
|
|
||||||
|
**2009/6942 items complete (28.9%)**
|
||||||
Reference in New Issue
Block a user