@@ -76,13 +76,18 @@ describeIntegration("Runtime integration tests", () => {
7676
7777 // DockerRuntime is slower than local/ssh, and the integration job has a hard
7878 // time budget. Keep the Docker coverage focused on the core Runtime contract.
79+ const describeLocalOnly = type === "local" ? describe : describe . skip ;
80+
7981 const describeNonDocker = type === "docker" ? describe . skip : describe ;
8082
8183 // Running these runtime contract tests with test.concurrent can easily overwhelm
8284 // the docker/ssh fixtures in CI and cause the overall integration job to hit its
8385 // 10-minute timeout. Keep runtime tests deterministic by running them sequentially
8486 // for remote runtimes.
8587 const testForRuntime = type === "local" ? test . concurrent : test ;
88+ const isRemote = type !== "local" ;
89+ const testLocalOnly = isRemote ? test . skip : testForRuntime ;
90+ const testDockerOnly = type === "docker" ? testForRuntime : test . skip ;
8691 const createRuntime = ( ) : Runtime =>
8792 createTestRuntime (
8893 type ,
@@ -121,7 +126,7 @@ describeIntegration("Runtime integration tests", () => {
121126 expect ( result . exitCode ) . toBe ( 42 ) ;
122127 } ) ;
123128
124- testForRuntime ( "handles stdin input" , async ( ) => {
129+ testLocalOnly ( "handles stdin input" , async ( ) => {
125130 const runtime = createRuntime ( ) ;
126131 await using workspace = await TestWorkspace . create ( runtime , type ) ;
127132
@@ -174,7 +179,7 @@ describeIntegration("Runtime integration tests", () => {
174179 expect ( result . exitCode ) . toBe ( 0 ) ;
175180 } ) ;
176181
177- testForRuntime ( "handles commands with quotes and special characters" , async ( ) => {
182+ testLocalOnly ( "handles commands with quotes and special characters" , async ( ) => {
178183 const runtime = createRuntime ( ) ;
179184 await using workspace = await TestWorkspace . create ( runtime , type ) ;
180185
@@ -194,7 +199,7 @@ describeIntegration("Runtime integration tests", () => {
194199
195200 expect ( result . stdout . trim ( ) ) . toContain ( workspace . path ) ;
196201 } ) ;
197- testForRuntime (
202+ testLocalOnly (
198203 "handles timeout correctly" ,
199204 async ( ) => {
200205 const runtime = createRuntime ( ) ;
@@ -272,7 +277,7 @@ describeIntegration("Runtime integration tests", () => {
272277 expect ( content ) . toBe ( "" ) ;
273278 } ) ;
274279
275- testForRuntime ( "reads binary data correctly" , async ( ) => {
280+ testLocalOnly ( "reads binary data correctly" , async ( ) => {
276281 const runtime = createRuntime ( ) ;
277282 await using workspace = await TestWorkspace . create ( runtime , type ) ;
278283
@@ -368,7 +373,7 @@ describeIntegration("Runtime integration tests", () => {
368373 expect ( content ) . toBe ( "" ) ;
369374 } ) ;
370375
371- testForRuntime ( "writes binary data" , async ( ) => {
376+ testLocalOnly ( "writes binary data" , async ( ) => {
372377 const runtime = createRuntime ( ) ;
373378 await using workspace = await TestWorkspace . create ( runtime , type ) ;
374379
@@ -407,7 +412,7 @@ describeIntegration("Runtime integration tests", () => {
407412 expect ( content ) . toBe ( specialContent ) ;
408413 } ) ;
409414
410- testForRuntime ( "preserves symlinks when editing target file" , async ( ) => {
415+ testDockerOnly ( "preserves symlinks when editing target file" , async ( ) => {
411416 const runtime = createRuntime ( ) ;
412417 await using workspace = await TestWorkspace . create ( runtime , type ) ;
413418
@@ -450,7 +455,7 @@ describeIntegration("Runtime integration tests", () => {
450455 expect ( targetContent ) . toBe ( "new content" ) ;
451456 } ) ;
452457
453- testForRuntime ( "preserves file permissions when editing through symlink" , async ( ) => {
458+ testDockerOnly ( "preserves file permissions when editing through symlink" , async ( ) => {
454459 const runtime = createRuntime ( ) ;
455460 await using workspace = await TestWorkspace . create ( runtime , type ) ;
456461
@@ -547,7 +552,7 @@ describeIntegration("Runtime integration tests", () => {
547552 } ) ;
548553 } ) ;
549554
550- describeNonDocker ( "Edge cases" , ( ) => {
555+ describeLocalOnly ( "Edge cases" , ( ) => {
551556 testForRuntime (
552557 "handles large files efficiently" ,
553558 async ( ) => {
@@ -566,7 +571,7 @@ describeIntegration("Runtime integration tests", () => {
566571 30000
567572 ) ;
568573
569- testForRuntime ( "handles concurrent operations" , async ( ) => {
574+ testLocalOnly ( "handles concurrent operations" , async ( ) => {
570575 const runtime = createRuntime ( ) ;
571576 await using workspace = await TestWorkspace . create ( runtime , type ) ;
572577
@@ -784,7 +789,7 @@ describeIntegration("Runtime integration tests", () => {
784789 } ) ;
785790 } ) ;
786791
787- describeNonDocker ( "Error handling" , ( ) => {
792+ describeLocalOnly ( "Error handling" , ( ) => {
788793 testForRuntime ( "handles command not found" , async ( ) => {
789794 const runtime = createRuntime ( ) ;
790795 await using workspace = await TestWorkspace . create ( runtime , type ) ;
0 commit comments