@@ -11,7 +11,7 @@ const actionId = '123__456';
1111const timestamp = Date . now ( ) ;
1212
1313describe ( 'clear bare and local clones' , async ( ) => {
14- it ( 'pull remote generates a local .remote folder' , async ( ) => {
14+ it ( 'pull remote generates a local .remote folder with hybrid cache structure ' , async ( ) => {
1515 const action = new Action ( actionId , 'type' , 'get' , timestamp , 'finos/git-proxy.git' ) ;
1616 action . url = 'https://github.com/finos/git-proxy.git' ;
1717
@@ -26,14 +26,16 @@ describe('clear bare and local clones', async () => {
2626 action ,
2727 ) ;
2828
29- expect ( fs . existsSync ( `./.remote/${ actionId } ` ) ) . to . be . true ;
29+ // Hybrid cache creates: .remote/cache (bare repos) and .remote/work (working copies)
30+ expect ( fs . existsSync ( `./.remote/work/${ actionId } ` ) ) . to . be . true ;
31+ expect ( fs . existsSync ( `./.remote/cache/git-proxy.git` ) ) . to . be . true ;
3032 } ) . timeout ( 20000 ) ;
3133
32- it ( 'clear bare clone function purges .remote folder and specific clone folder ' , async ( ) => {
34+ it ( 'clear bare clone function purges .remote folder in test environment ' , async ( ) => {
3335 const action = new Action ( actionId , 'type' , 'get' , timestamp , 'finos/git-proxy.git' ) ;
3436 await clearBareClone ( null , action ) ;
35- expect ( fs . existsSync ( `./ .remote` ) ) . to . throw ;
36- expect ( fs . existsSync ( `./.remote/ ${ actionId } ` ) ) . to . throw ;
37+ // In test environment, clearBareClone removes the entire .remote directory
38+ expect ( fs . existsSync ( `./.remote` ) ) . to . be . false ;
3739 } ) ;
3840
3941 afterEach ( ( ) => {
0 commit comments