@@ -6,11 +6,13 @@ const { Action } = require('../../src/proxy/actions/Action');
66chai . should ( ) ;
77
88const expect = chai . expect ;
9+
10+ const actionId = '123__456' ;
911const timestamp = Date . now ( ) ;
1012
1113describe ( 'clear bare and local clones' , async ( ) => {
1214 it ( 'pull remote generates a local .remote folder' , async ( ) => {
13- const action = new Action ( '123' , 'type' , 'get' , timestamp , 'finos/git-proxy.git' ) ;
15+ const action = new Action ( actionId , 'type' , 'get' , timestamp , 'finos/git-proxy.git' ) ;
1416 action . url = 'https://github.com/finos/git-proxy.git' ;
1517
1618 const authorization = `Basic ${ Buffer . from ( 'JamieSlome:test' ) . toString ( 'base64' ) } ` ;
@@ -24,14 +26,14 @@ describe('clear bare and local clones', async () => {
2426 action ,
2527 ) ;
2628
27- expect ( fs . existsSync ( `./.remote/${ timestamp } ` ) ) . to . be . true ;
29+ expect ( fs . existsSync ( `./.remote/${ actionId } ` ) ) . to . be . true ;
2830 } ) . timeout ( 20000 ) ;
2931
3032 it ( 'clear bare clone function purges .remote folder and specific clone folder' , async ( ) => {
31- const action = new Action ( '123' , 'type' , 'get' , timestamp , 'finos/git-proxy.git' ) ;
33+ const action = new Action ( actionId , 'type' , 'get' , timestamp , 'finos/git-proxy.git' ) ;
3234 await clearBareClone ( null , action ) ;
3335 expect ( fs . existsSync ( `./.remote` ) ) . to . throw ;
34- expect ( fs . existsSync ( `./.remote/${ timestamp } ` ) ) . to . throw ;
36+ expect ( fs . existsSync ( `./.remote/${ actionId } ` ) ) . to . throw ;
3537 } ) ;
3638
3739 afterEach ( ( ) => {
0 commit comments