The list-handler prompt (MergeHelperDefault) tells the handler to read maxParallelExecutions via get_app_settings, but the DTO never carried the field. Handler had to fall back to reading app_settings directly from the DB on the 2026-07-29 E2E run.
32 lines
980 B
C#
32 lines
980 B
C#
using ClaudeDo.Data.Models;
|
|
using ClaudeDo.Worker.External;
|
|
using ClaudeDo.Worker.Tests.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace ClaudeDo.Worker.Tests.External;
|
|
|
|
public sealed class AppSettingsMcpToolsTests : IDisposable
|
|
{
|
|
private readonly DbFixture _db = new();
|
|
|
|
public void Dispose() => _db.Dispose();
|
|
|
|
[Fact]
|
|
public async Task GetAppSettings_ReturnsMaxParallelExecutionsFromDb()
|
|
{
|
|
using (var ctx = _db.CreateContext())
|
|
{
|
|
var row = await ctx.AppSettings.FirstOrDefaultAsync(s => s.Id == AppSettingsEntity.SingletonId)
|
|
?? throw new InvalidOperationException("Expected seeded app_settings row.");
|
|
row.MaxParallelExecutions = 3;
|
|
await ctx.SaveChangesAsync();
|
|
}
|
|
|
|
var sut = new AppSettingsMcpTools(_db.CreateFactory());
|
|
|
|
var result = await sut.GetAppSettings(CancellationToken.None);
|
|
|
|
Assert.Equal(3, result.MaxParallelExecutions);
|
|
}
|
|
}
|