feat(esg): TimeoutSeconds travels the artifact pipeline (additive contract) into site SQLite so site-side calls honor it
Claude-Session: https://claude.ai/code/session_01MtdgwpEeCUn6cUA5f1LMPj
This commit is contained in:
@@ -54,6 +54,26 @@ public class SiteRepositoryTests : IDisposable
|
||||
Assert.Equal("https://api.example.com", all[0].EndpointUrl);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ExternalSystemGateway (Timeout): the per-system <c>TimeoutSeconds</c> stored via
|
||||
/// <see cref="SiteStorageService.StoreExternalSystemAsync"/> must round-trip through the
|
||||
/// site SQLite store and back out via the repository, so site-side calls honor it.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task SiteStorage_ExternalSystem_TimeoutSeconds_RoundTrips()
|
||||
{
|
||||
var storage = NewStorage();
|
||||
await storage.InitializeAsync();
|
||||
await storage.StoreExternalSystemAsync(
|
||||
"WeatherApi", "https://api.example.com", "ApiKey", "{\"key\":\"x\"}", null, 7);
|
||||
|
||||
var repo = new SiteExternalSystemRepository(storage);
|
||||
var found = await repo.GetExternalSystemByNameAsync("WeatherApi");
|
||||
|
||||
Assert.NotNull(found);
|
||||
Assert.Equal(7, found!.TimeoutSeconds);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SiteRuntime-007: the synthetic ID for an external system must be identical when
|
||||
/// the storage service and repository are re-created (simulating a process restart).
|
||||
|
||||
Reference in New Issue
Block a user