more audit work
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user