bfcd223374
- Author the four V1 skill atoms in skills/ (Git is the source of truth): spec-writing & story-breakdown (product-owner), test-plan-generation & diff-review (qa) — each with risk-tagged actions, golden tests, and a body. - SharedKernel: IGitProvider seam (read-only, provider-agnostic) + GitFile. - Integrations module (its first real code): FileSystemGitProvider (dogfood/local) and a GiteaGitProvider (Gitea REST: recursive tree → SKILL.md blobs → base64 contents); the provider is chosen by GitSource:Provider config. - Skills: SkillSyncService consumes IGitProvider (never Integrations) and indexes each file; POST /api/skills/sync and a POST /api/skills/webhook/gitea (re-sync on push; signature verification + changed-file-only + queue offload come later). Verified: build green; ArchitectureTests 8/8 (Skills & Integrations reference only SharedKernel; the Git seam lives in SharedKernel); IntegrationTests 22/22 incl. a sync that indexes the four real atoms from skills/, published and queryable by role. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
30 lines
1002 B
C#
30 lines
1002 B
C#
using Microsoft.AspNetCore.Hosting;
|
|
using Microsoft.AspNetCore.Mvc.Testing;
|
|
|
|
namespace TeamUp.IntegrationTests;
|
|
|
|
/// <summary>
|
|
/// Drives the real <see cref="Program"/> web host against the test container, in Development so
|
|
/// migrations apply on startup and the OpenAPI document is mapped.
|
|
/// </summary>
|
|
public sealed class TeamUpWebFactory(
|
|
string connectionString,
|
|
IReadOnlyDictionary<string, string?>? settings = null) : WebApplicationFactory<Program>
|
|
{
|
|
protected override void ConfigureWebHost(IWebHostBuilder builder)
|
|
{
|
|
builder.UseEnvironment("Development");
|
|
builder.UseSetting("ConnectionStrings:Postgres", connectionString);
|
|
builder.UseSetting("Database:ApplyMigrationsOnStartup", "true");
|
|
builder.UseSetting("OpenTelemetry:OtlpEndpoint", string.Empty);
|
|
|
|
if (settings is not null)
|
|
{
|
|
foreach (var (key, value) in settings)
|
|
{
|
|
builder.UseSetting(key, value);
|
|
}
|
|
}
|
|
}
|
|
}
|