99 readFileSync,
1010 copySync,
1111 writeFileSync,
12+ statSync,
1213 pathExistsSync
1314} = require ( 'fs-extra' ) ;
1415const { quote } = require ( 'shell-quote' ) ;
@@ -875,6 +876,12 @@ test(
875876 'foobar has retained its executable file permissions'
876877 ) ;
877878
879+ const flaskPerm = statSync ( '.serverless/requirements/bin/flask' ) . mode ;
880+ t . true (
881+ zipfiles_with_metadata [ 'bin/flask' ] . unixPermissions === flaskPerm ,
882+ 'bin/flask has retained its executable file permissions'
883+ ) ;
884+
878885 t . end ( ) ;
879886 } ,
880887 { skip : process . platform === 'win32' }
@@ -1566,15 +1573,23 @@ test(
15661573 npm ( [ 'i' , path ] ) ;
15671574 sls ( [ 'package' ] ) ;
15681575
1569- const zipfiles_hello = listZipFilesWithMetaData ( '.serverless/hello1.zip' ) ;
1576+ const zipfiles_hello1 = listZipFilesWithMetaData ( '.serverless/hello1.zip' ) ;
15701577
15711578 t . true (
1572- zipfiles_hello [ 'module1/foobar' ] . unixPermissions
1579+ zipfiles_hello1 [ 'module1/foobar' ] . unixPermissions
15731580 . toString ( 8 )
15741581 . slice ( 3 , 6 ) === perm ,
15751582 'foobar has retained its executable file permissions'
15761583 ) ;
15771584
1585+ const zipfiles_hello2 = listZipFilesWithMetaData ( '.serverless/module2-sls-py-req-test-indiv-dev-hello2.zip' ) ;
1586+ const flaskPerm = statSync ( '.serverless/module2/requirements/bin/flask' ) . mode ;
1587+
1588+ t . true (
1589+ zipfiles_hello2 [ 'bin/flask' ] . unixPermissions === flaskPerm ,
1590+ 'bin/flask has retained its executable file permissions'
1591+ ) ;
1592+
15781593 t . end ( ) ;
15791594 } ,
15801595 { skip : process . platform === 'win32' }
@@ -1601,6 +1616,14 @@ test(
16011616 'foobar has retained its executable file permissions'
16021617 ) ;
16031618
1619+ const zipfiles_hello2 = listZipFilesWithMetaData ( '.serverless/module2-sls-py-req-test-indiv-dev-hello2.zip' ) ;
1620+ const flaskPerm = statSync ( '.serverless/module2/requirements/bin/flask' ) . mode ;
1621+
1622+ t . true (
1623+ zipfiles_hello2 [ 'bin/flask' ] . unixPermissions === flaskPerm ,
1624+ 'bin/flask has retained its executable file permissions'
1625+ ) ;
1626+
16041627 t . end ( ) ;
16051628 } ,
16061629 { skip : ! canUseDocker ( ) || process . platform === 'win32' }
0 commit comments