more audit work

This commit is contained in:
master
2026-01-08 10:21:51 +02:00
parent 43c02081ef
commit 51cf4bc16c
546 changed files with 36721 additions and 4003 deletions

View File

@@ -14,6 +14,13 @@ namespace StellaOps.Policy.Pack.Tests;
public class PolicyPackSchemaTests
{
private static readonly Lazy<JsonSchema> Schema = new(() =>
{
var schemaPath = Path.Combine(AppContext.BaseDirectory, "TestData", "policy-pack.schema.json");
var schemaContent = File.ReadAllText(schemaPath);
return JsonSchema.FromText(schemaContent);
});
private readonly string _testDataPath;
private readonly JsonSchema _schema;
private readonly IDeserializer _yamlDeserializer;
@@ -22,9 +29,7 @@ public class PolicyPackSchemaTests
public PolicyPackSchemaTests()
{
_testDataPath = Path.Combine(AppContext.BaseDirectory, "TestData");
var schemaPath = Path.Combine(_testDataPath, "policy-pack.schema.json");
var schemaContent = File.ReadAllText(schemaPath);
_schema = JsonSchema.FromText(schemaContent);
_schema = Schema.Value;
_yamlDeserializer = new DeserializerBuilder()
.WithNamingConvention(CamelCaseNamingConvention.Instance)