agent: unify listening and dialing with directed mutual measurements
Replace Probe with Agent across node runtime, Fleet contracts, backend state, API and storage. Report incoming sessions and outgoing link health through each Agent uplink, and retain directed link controls and retry. Update protocol fixtures and end-to-end coverage for the unified model; accept requested cancellation during the Fleet timeout test cleanup.
This commit is contained in:
1 parent
d5ebf29e57
commit
ad5efc62ff
206 files changed
+4202
-4964
No files matched your search
@@ -1,3 +1,4 @@
|
||||
using Fleet.Core;
|
||||
using System.Net;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using MoShiro.Backend.Application;
|
||||
@@ -91,12 +92,13 @@ public sealed class AddressTests : IClassFixture<BackendFixture>
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ProbeAgentList_CarriesTheCertificatePublicKeyTheAgentReported_ForPinningAndKnocking()
|
||||
public async Task DialTargets_CarryTheCertificatePublicKeyTheNodeEnrolledWith_ForPinningAndKnocking()
|
||||
{
|
||||
await using AgentSimulator agent = await _backend.ConnectAgentAsync();
|
||||
AgentService service = _backend.Services.GetRequiredService<AgentService>();
|
||||
ProbeAgentList list = await service.ProbeAgentsAsync(_backend.DefaultProbeId, default);
|
||||
AgentEndpoint endpoint = Assert.Single(list.Agents, a => a.AgentId == agent.NodeId);
|
||||
AgentRecord dialer = (await _backend.Services.GetRequiredService<IAgentStore>().GetAsync(new NodeId(_backend.DefaultDialerId), default))!;
|
||||
DialTargets list = await service.DialTargetsAsync(dialer, default);
|
||||
DialTarget endpoint = Assert.Single(list.Targets, t => t.NodeId == agent.NodeId);
|
||||
Assert.Equal(Convert.ToBase64String(agent.TlsPublicKey), endpoint.PublicKey);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user