search and ai stabilization work, localization stablized.

This commit is contained in:
master
2026-02-24 23:29:36 +02:00
parent 4f947a8b61
commit b07d27772e
766 changed files with 55299 additions and 3221 deletions

View File

@@ -0,0 +1,42 @@
using System.Net;
using System.Net.Http.Json;
using System.Text.Json;
using StellaOps.Auth.Abstractions;
using StellaOps.Scanner.WebService.Endpoints;
using StellaOps.TestKit;
namespace StellaOps.Scanner.WebService.Tests;
public sealed class SliceLocalizationEndpointsTests
{
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task QuerySlice_WithoutScanId_WithGermanLocale_ReturnsLocalizedError()
{
await using var factory = ScannerApplicationFactory.CreateLightweight().WithOverrides(
configureConfiguration: static config =>
{
config["scanner:authority:enabled"] = "false";
});
await factory.InitializeAsync();
using var client = factory.CreateClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "/api/slices/query")
{
Content = JsonContent.Create(new SliceQueryRequestDto
{
CveId = "CVE-2024-1234"
})
};
request.Headers.TryAddWithoutValidation(StellaOpsHttpHeaderNames.Tenant, "tenant-a");
request.Headers.TryAddWithoutValidation("X-Locale", "de-DE");
var response = await client.SendAsync(request);
var content = await response.Content.ReadAsStringAsync();
Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);
using var payload = JsonDocument.Parse(content);
Assert.Equal("scanId ist erforderlich", payload.RootElement.GetProperty("error").GetString());
}
}

View File

@@ -15,3 +15,4 @@ Source of truth: `docs/implplan/SPRINT_20260130_002_Tools_csproj_remediation_sol
| SPRINT-20260222-057-SCAN-TEN-10 | DONE | `SPRINT_20260222_057_Scanner_tenant_isolation_for_scans_triage_webhooks.md`: added focused Unknowns endpoint tenant-isolation coverage (`UnknownsTenantIsolationEndpointsTests`) for cross-tenant not-found and tenant-conflict rejection (2026-02-22). |
| SPRINT-20260222-057-SCAN-TEN-11 | DONE | `SPRINT_20260222_057_Scanner_tenant_isolation_for_scans_triage_webhooks.md`: added SmartDiff and Reachability tenant-propagation regression checks (`SmartDiffEndpointsTests`, `ReachabilityDriftEndpointsTests`) and validated focused suites (2026-02-23). |
| SPRINT-20260222-057-SCAN-TEN-13 | DONE | `SPRINT_20260222_057_Scanner_tenant_isolation_for_scans_triage_webhooks.md`: added `SecretExceptionPatternServiceTenantIsolationTests` validating tenant-scoped repository lookups for exception get/update/delete (`3` tests, 2026-02-23). |
| SPRINT-20260224-002-LOC-101-T | DONE | `SPRINT_20260224_002_Platform_translation_rollout_phase3_phase4.md`: added focused Scanner localization endpoint behavior test (`SliceLocalizationEndpointsTests`) and validated targeted German locale response text. |