@@ -13,6 +13,30 @@ namespace IronConfig.ILog.Tests;
1313/// </summary>
1414public class IlogParityTests
1515{
16+ private static bool TryResolveDatasetPaths ( string dataset , out string vectorPath , out string manifestPath )
17+ {
18+ vectorPath = GetTestVectorPath ( dataset ) ;
19+ manifestPath = GetManifestPath ( dataset ) ;
20+
21+ var hasVector = File . Exists ( vectorPath ) ;
22+ var hasManifest = File . Exists ( manifestPath ) ;
23+
24+ if ( hasVector && hasManifest )
25+ {
26+ return true ;
27+ }
28+
29+ if ( string . Equals ( dataset , "mega" , StringComparison . OrdinalIgnoreCase ) )
30+ {
31+ // Mega vectors are optional in CI due to artifact size policy.
32+ return false ;
33+ }
34+
35+ Assert . True ( hasVector , $ "Vector not found: { vectorPath } ") ;
36+ Assert . True ( hasManifest , $ "Manifest not found: { manifestPath } ") ;
37+ return false ;
38+ }
39+
1640 private static string FindRepoRoot ( )
1741 {
1842 return TestVectorHelper . FindRepositoryRoot ( ) ;
@@ -66,8 +90,10 @@ string expected_blake3
6690 [ InlineData ( "mega" ) ]
6791 public void GoldenVectorValidateStrictPasses ( string dataset )
6892 {
69- var filePath = GetTestVectorPath ( dataset ) ;
70- Assert . True ( File . Exists ( filePath ) , $ "Vector not found: { filePath } ") ;
93+ if ( ! TryResolveDatasetPaths ( dataset , out var filePath , out _ ) )
94+ {
95+ return ;
96+ }
7197
7298 var fileBytes = File . ReadAllBytes ( filePath ) ;
7399 var error = IlogReader . Open ( fileBytes , out var view ) ;
@@ -94,10 +120,10 @@ public void GoldenVectorValidateStrictPasses(string dataset)
94120 [ InlineData ( "mega" ) ]
95121 public void ManifestParityEventCount ( string dataset )
96122 {
97- var vectorPath = GetTestVectorPath ( dataset ) ;
98- var manifestPath = GetManifestPath ( dataset ) ;
99-
100- Assert . True ( File . Exists ( manifestPath ) , $ "Manifest not found: { manifestPath } " ) ;
123+ if ( ! TryResolveDatasetPaths ( dataset , out var vectorPath , out var manifestPath ) )
124+ {
125+ return ;
126+ }
101127 var manifestJson = File . ReadAllText ( manifestPath ) ;
102128 var manifest = JsonSerializer . Deserialize < Manifest > ( manifestJson ) ;
103129 Assert . NotNull ( manifest ) ;
@@ -120,8 +146,10 @@ public void ManifestParityEventCount(string dataset)
120146 [ InlineData ( "mega" ) ]
121147 public void ManifestParityCrc32 ( string dataset )
122148 {
123- var vectorPath = GetTestVectorPath ( dataset ) ;
124- var manifestPath = GetManifestPath ( dataset ) ;
149+ if ( ! TryResolveDatasetPaths ( dataset , out var vectorPath , out var manifestPath ) )
150+ {
151+ return ;
152+ }
125153
126154 var manifestJson = File . ReadAllText ( manifestPath ) ;
127155 var manifest = JsonSerializer . Deserialize < Manifest > ( manifestJson ) ;
@@ -149,8 +177,10 @@ public void ManifestParityCrc32(string dataset)
149177 [ InlineData ( "mega" ) ]
150178 public void ManifestParityBlake3 ( string dataset )
151179 {
152- var vectorPath = GetTestVectorPath ( dataset ) ;
153- var manifestPath = GetManifestPath ( dataset ) ;
180+ if ( ! TryResolveDatasetPaths ( dataset , out var vectorPath , out var manifestPath ) )
181+ {
182+ return ;
183+ }
154184
155185 var manifestJson = File . ReadAllText ( manifestPath ) ;
156186 var manifest = JsonSerializer . Deserialize < Manifest > ( manifestJson ) ;
0 commit comments