@@ -101,8 +101,13 @@ func TestTruncate(t *testing.T) {
101101func TestRunnerWithMockCaller (t * testing.T ) {
102102 caller := newMockCaller ()
103103
104+ // Create a valid repo root with an empty fixtures directory
105+ dir := t .TempDir ()
106+ testsDir := filepath .Join (dir , "client" , "integration-tests" , "primitives" , "tools" )
107+ os .MkdirAll (testsDir , 0o755 )
108+
104109 opts := RunnerOptions {
105- RepoRoot : "/nonexistent" ,
110+ RepoRoot : dir ,
106111 FilterTools : []string {"nonexistent_tool" },
107112 }
108113
@@ -111,9 +116,8 @@ func TestRunnerWithMockCaller(t *testing.T) {
111116 t .Fatal ("NewRunner returned nil" )
112117 }
113118
114- // Running with nonexistent directory should not panic
119+ // Running with no matching tool dirs = all passed (vacuously true)
115120 allPassed , results := runner .Run ()
116- // No tests found = all passed (vacuously true)
117121 if ! allPassed {
118122 t .Error ("expected allPassed=true when no tests found" )
119123 }
@@ -125,8 +129,13 @@ func TestRunnerWithMockCaller(t *testing.T) {
125129func TestRunnerNoInstallPacks (t * testing.T ) {
126130 caller := newMockCaller ()
127131
132+ // Create a valid repo root with an empty fixtures directory
133+ dir := t .TempDir ()
134+ testsDir := filepath .Join (dir , "client" , "integration-tests" , "primitives" , "tools" )
135+ os .MkdirAll (testsDir , 0o755 )
136+
128137 opts := RunnerOptions {
129- RepoRoot : "/nonexistent" ,
138+ RepoRoot : dir ,
130139 NoInstallPacks : true ,
131140 FilterTools : []string {"codeql_pack_install" },
132141 }
@@ -295,6 +304,28 @@ func TestValidateAssertions_MultipleBlocks(t *testing.T) {
295304 }
296305}
297306
307+ func TestRunnerMissingFixturesDirFails (t * testing.T ) {
308+ caller := newMockCaller ()
309+
310+ // Point to a repo root that exists but has no client/integration-tests/primitives/tools
311+ dir := t .TempDir ()
312+
313+ opts := RunnerOptions {
314+ RepoRoot : dir ,
315+ }
316+
317+ runner := NewRunner (caller , opts )
318+ allPassed , results := runner .Run ()
319+
320+ // A missing fixtures directory must be treated as a hard failure
321+ if allPassed {
322+ t .Error ("expected allPassed=false when fixtures directory is missing" )
323+ }
324+ if len (results ) == 0 {
325+ t .Error ("expected at least one failure result for missing fixtures directory" )
326+ }
327+ }
328+
298329func TestRunnerAssertionFailure (t * testing.T ) {
299330 caller := newMockCaller ()
300331 caller .results ["mock_tool" ] = mockResult {
0 commit comments