tests fixes and sprints work

This commit is contained in:
master
2026-01-22 19:08:46 +02:00
parent c32fff8f86
commit 726d70dc7f
881 changed files with 134434 additions and 6228 deletions

View File

@@ -45,7 +45,7 @@ public static class BundleVerifyCommand
var bundleOption = new Option<string>("--bundle", "-b")
{
Description = "Path to bundle (tar.gz or directory)",
IsRequired = true
Required = true
};
var trustRootOption = new Option<string?>("--trust-root")
@@ -267,10 +267,9 @@ public static class BundleVerifyCommand
using var reader = new StreamReader(gz);
// Simple extraction (matches our simple tar format)
while (!reader.EndOfStream)
string? line;
while ((line = await reader.ReadLineAsync(ct)) != null)
{
var line = await reader.ReadLineAsync(ct);
if (line == null) break;
if (line.StartsWith("FILE:"))
{
@@ -288,7 +287,7 @@ public static class BundleVerifyCommand
}
var buffer = new char[size];
await reader.ReadBlockAsync(buffer, 0, size, ct);
await reader.ReadBlockAsync(buffer, 0, size);
await File.WriteAllTextAsync(fullPath, new string(buffer), ct);
}
}
@@ -472,9 +471,10 @@ public static class BundleVerifyCommand
// Check that required payload types are present
var present = manifest?.Bundle?.Artifacts?
.Where(a => !string.IsNullOrEmpty(a.MediaType))
.Select(a => a.MediaType)
.ToHashSet() ?? [];
.Where(mediaType => !string.IsNullOrWhiteSpace(mediaType))
.Select(mediaType => mediaType!)
.ToHashSet(StringComparer.OrdinalIgnoreCase) ?? [];
var missing = expected.Where(e => !present.Any(p =>
p.Contains(e.Split(';')[0], StringComparison.OrdinalIgnoreCase))).ToList();