test(openclaw): expose reconcile fixture inventory
CI - Build & Test / Backend (.NET) (push) Successful in 50s
CI - Build & Test / Backend integration (PostgreSQL/Toxiproxy) (push) Failing after 57s
CI - Build & Test / Frontend (Vue/TS) (push) Has been cancelled
CI - Build & Test / Security Check (push) Has been cancelled
CI - Build & Test / Deploy Nexus (push) Has been cancelled
CI - Build & Test / Backend (.NET) (push) Successful in 50s
CI - Build & Test / Backend integration (PostgreSQL/Toxiproxy) (push) Failing after 57s
CI - Build & Test / Frontend (Vue/TS) (push) Has been cancelled
CI - Build & Test / Security Check (push) Has been cancelled
CI - Build & Test / Deploy Nexus (push) Has been cancelled
This commit is contained in:
@@ -132,7 +132,8 @@ public sealed class ToxiproxyAgentProvisioningIntegrationTests
|
|||||||
StringComparison.Ordinal),
|
StringComparison.Ordinal),
|
||||||
$"Expected ready after read-only reconciliation, got "
|
$"Expected ready after read-only reconciliation, got "
|
||||||
+ $"'{reconciled.Status}' ({reconciled.Error?.Code}: "
|
+ $"'{reconciled.Status}' ({reconciled.Error?.Code}: "
|
||||||
+ $"{reconciled.Error?.Message}).");
|
+ $"{reconciled.Error?.Message}). Last test inventory: "
|
||||||
|
+ $"{gateway.LastAgentInventory ?? "<none>"}");
|
||||||
Assert.Equal("release-analyst", reconciled.OpenClawAgentId);
|
Assert.Equal("release-analyst", reconciled.OpenClawAgentId);
|
||||||
Assert.Equal(1, gateway.CreateCalls);
|
Assert.Equal(1, gateway.CreateCalls);
|
||||||
}
|
}
|
||||||
@@ -229,8 +230,10 @@ internal sealed class ToxiproxyHttpGatewayConnector(Uri endpoint)
|
|||||||
BaseAddress = endpoint
|
BaseAddress = endpoint
|
||||||
};
|
};
|
||||||
private int createCalls;
|
private int createCalls;
|
||||||
|
private string? lastAgentInventory;
|
||||||
|
|
||||||
public int CreateCalls => Volatile.Read(ref createCalls);
|
public int CreateCalls => Volatile.Read(ref createCalls);
|
||||||
|
public string? LastAgentInventory => Volatile.Read(ref lastAgentInventory);
|
||||||
public GatewayConnectionState ConnectionState => GatewayConnectionState.Connected;
|
public GatewayConnectionState ConnectionState => GatewayConnectionState.Connected;
|
||||||
public string? GatewayVersion => "2026.7.1";
|
public string? GatewayVersion => "2026.7.1";
|
||||||
public string? RequiredVersion => "2026.7.1";
|
public string? RequiredVersion => "2026.7.1";
|
||||||
@@ -304,9 +307,11 @@ internal sealed class ToxiproxyHttpGatewayConnector(Uri endpoint)
|
|||||||
using (response)
|
using (response)
|
||||||
{
|
{
|
||||||
response.EnsureSuccessStatusCode();
|
response.EnsureSuccessStatusCode();
|
||||||
return JsonNode.Parse(
|
var payload = await response.Content.ReadAsStringAsync(
|
||||||
await response.Content.ReadAsStringAsync(
|
timeoutSource.Token);
|
||||||
timeoutSource.Token));
|
if (method == "agents.list")
|
||||||
|
Interlocked.Exchange(ref lastAgentInventory, payload);
|
||||||
|
return JsonNode.Parse(payload);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException)
|
catch (OperationCanceledException)
|
||||||
|
|||||||
Reference in New Issue
Block a user