Fix build and code structure improvements. New but essential UI functionality. CI improvements. Documentation improvements. AI module improvements.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.IO.Compression;
|
||||
using System.IO.Compression;
|
||||
using StellaOps.PacksRegistry.Core.Services;
|
||||
using StellaOps.PacksRegistry.Infrastructure.InMemory;
|
||||
using StellaOps.PacksRegistry.Infrastructure.Verification;
|
||||
@@ -13,7 +13,7 @@ public sealed class ExportServiceTests
|
||||
[Fact]
|
||||
public async Task Offline_seed_includes_metadata_and_content_when_requested()
|
||||
{
|
||||
var ct = TestContext.Current.CancellationToken;
|
||||
var ct = CancellationToken.None;
|
||||
var packRepo = new InMemoryPackRepository();
|
||||
var parityRepo = new InMemoryParityRepository();
|
||||
var lifecycleRepo = new InMemoryLifecycleRepository();
|
||||
@@ -34,7 +34,6 @@ public sealed class ExportServiceTests
|
||||
var archiveStream = await exportService.ExportOfflineSeedAsync(record.TenantId, includeContent: true, includeProvenance: true, cancellationToken: ct);
|
||||
using var archive = new ZipArchive(archiveStream, ZipArchiveMode.Read);
|
||||
|
||||
using StellaOps.TestKit;
|
||||
Assert.NotNull(archive.GetEntry("packs.ndjson"));
|
||||
Assert.NotNull(archive.GetEntry("parity.ndjson"));
|
||||
Assert.NotNull(archive.GetEntry("lifecycle.ndjson"));
|
||||
|
||||
@@ -14,7 +14,7 @@ public sealed class FilePackRepositoryTests
|
||||
Directory.CreateDirectory(tempPath);
|
||||
try
|
||||
{
|
||||
var ct = TestContext.Current.CancellationToken;
|
||||
var ct = CancellationToken.None;
|
||||
var repo = new FilePackRepository(tempPath);
|
||||
|
||||
var record = new PackRecord(
|
||||
|
||||
@@ -13,7 +13,7 @@ public sealed class PackServiceTests
|
||||
[Fact]
|
||||
public async Task Upload_persists_pack_with_digest()
|
||||
{
|
||||
var ct = TestContext.Current.CancellationToken;
|
||||
var ct = CancellationToken.None;
|
||||
var repo = new InMemoryPackRepository();
|
||||
var verifier = new SimpleSignatureVerifier();
|
||||
var service = new PackService(repo, verifier, new InMemoryAuditRepository(), null, TimeProvider.System);
|
||||
@@ -41,7 +41,7 @@ public sealed class PackServiceTests
|
||||
[Fact]
|
||||
public async Task Upload_rejects_when_digest_mismatch()
|
||||
{
|
||||
var ct = TestContext.Current.CancellationToken;
|
||||
var ct = CancellationToken.None;
|
||||
var repo = new InMemoryPackRepository();
|
||||
var verifier = new AlwaysFailSignatureVerifier();
|
||||
var service = new PackService(repo, verifier, new InMemoryAuditRepository(), null, TimeProvider.System);
|
||||
@@ -63,7 +63,7 @@ public sealed class PackServiceTests
|
||||
[Fact]
|
||||
public async Task Rotate_signature_updates_record_and_audits()
|
||||
{
|
||||
var ct = TestContext.Current.CancellationToken;
|
||||
var ct = CancellationToken.None;
|
||||
var repo = new InMemoryPackRepository();
|
||||
var audit = new InMemoryAuditRepository();
|
||||
var verifier = new SimpleSignatureVerifier();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Net;
|
||||
using System.Net;
|
||||
using System.Net.Http.Json;
|
||||
using System.IO.Compression;
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
@@ -48,7 +48,7 @@ public sealed class PacksApiTests : IClassFixture<WebApplicationFactory<Program>
|
||||
[Fact]
|
||||
public async Task Upload_and_download_round_trip()
|
||||
{
|
||||
var ct = TestContext.Current.CancellationToken;
|
||||
var ct = CancellationToken.None;
|
||||
var client = _factory.CreateClient();
|
||||
|
||||
client.DefaultRequestHeaders.Add("X-StellaOps-Tenant", "t1");
|
||||
@@ -124,7 +124,6 @@ public sealed class PacksApiTests : IClassFixture<WebApplicationFactory<Program>
|
||||
Assert.Equal(HttpStatusCode.OK, offlineSeed.StatusCode);
|
||||
var bytesZip = await offlineSeed.Content.ReadAsByteArrayAsync(ct);
|
||||
using var archive = new ZipArchive(new MemoryStream(bytesZip));
|
||||
using StellaOps.TestKit;
|
||||
Assert.NotNull(archive.GetEntry("packs.ndjson"));
|
||||
Assert.NotNull(archive.GetEntry($"content/{created.PackId}.bin"));
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using StellaOps.PacksRegistry.Infrastructure.Verification;
|
||||
|
||||
@@ -12,7 +12,7 @@ public sealed class RsaSignatureVerifierTests
|
||||
[Fact]
|
||||
public async Task Verify_succeeds_when_signature_matches_digest()
|
||||
{
|
||||
var ct = TestContext.Current.CancellationToken;
|
||||
var ct = CancellationToken.None;
|
||||
using var rsa = RSA.Create(2048);
|
||||
var publicPem = ExportPublicPem(rsa);
|
||||
|
||||
@@ -29,9 +29,8 @@ public sealed class RsaSignatureVerifierTests
|
||||
[Fact]
|
||||
public async Task Verify_fails_on_invalid_signature()
|
||||
{
|
||||
var ct = TestContext.Current.CancellationToken;
|
||||
var ct = CancellationToken.None;
|
||||
using var rsa = RSA.Create(2048);
|
||||
using StellaOps.TestKit;
|
||||
var publicPem = ExportPublicPem(rsa);
|
||||
const string digest = "sha256:deadbeef";
|
||||
var sig = Convert.ToBase64String(Encoding.UTF8.GetBytes("bogus"));
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<UseXunitV3>true</UseXunitV3>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseConcelierTestInfra>false</UseConcelierTestInfra>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<IsPackable>false</IsPackable>
|
||||
@@ -12,11 +12,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.0" />
|
||||
<PackageReference Include="xunit.v3" Version="3.0.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.3" />
|
||||
</ItemGroup>
|
||||
<PackageReference Include="xunit.v3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
|
||||
@@ -32,4 +29,4 @@
|
||||
<ProjectReference Include="..\StellaOps.PacksRegistry.WebService\StellaOps.PacksRegistry.WebService.csproj" />
|
||||
<ProjectReference Include="../../../__Libraries/StellaOps.TestKit/StellaOps.TestKit.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user