File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2089,6 +2089,18 @@ describe('docker-manager', () => {
20892089 expect ( fs . existsSync ( testDir ) ) . toBe ( false ) ;
20902090 } ) ;
20912091
2092+ it ( 'should clean up chroot-home directory alongside workDir' , async ( ) => {
2093+ // Create chroot-home sibling directory (as writeConfigs does in chroot mode)
2094+ const chrootHomeDir = `${ testDir } -chroot-home` ;
2095+ fs . mkdirSync ( chrootHomeDir , { recursive : true } ) ;
2096+
2097+ await cleanup ( testDir , false ) ;
2098+
2099+ // Both workDir and chroot-home should be removed
2100+ expect ( fs . existsSync ( testDir ) ) . toBe ( false ) ;
2101+ expect ( fs . existsSync ( chrootHomeDir ) ) . toBe ( false ) ;
2102+ } ) ;
2103+
20922104 it ( 'should preserve agent logs when they exist' , async ( ) => {
20932105 // Create agent logs directory with a file
20942106 const agentLogsDir = path . join ( testDir , 'agent-logs' ) ;
You can’t perform that action at this time.
0 commit comments